proper a4 sizing

master
LEdoian 2 years ago
parent a8c05db694
commit b959cf5806

@ -15,6 +15,7 @@ string envfmt = "C6";
// debugging tool
bool with_labels = true;
bool force_a4 = true;
// It is unpractical to try emulating second quadrant. We will work in the
@ -22,9 +23,6 @@ bool with_labels = true;
// the whole page). Therefore, the bottom edge of the page is at y=(210-297)
int pgbot = pgw - pgh;
//Force A4 size
//draw((0,pgbot) -- (0, sqsz) -- (sqsz, sqsz) -- (sqsz, pgbot) -- cycle, invisible);
// gimme a square?
if (with_labels) draw(box((0,0), (sqsz, sqsz)), p=red);
@ -116,3 +114,10 @@ draw(cb2 -- cl2);
draw(cl1 -- (0, sqsz) -- ct2);
draw(ct1 -- cr1);
draw(cr2 -- (sqsz, 0) -- cb1);
//Force A4 output size
path a4_outline = (0,pgbot) -- (0, sqsz) -- (sqsz, sqsz) -- (sqsz, pgbot) -- cycle;
if (force_a4) {
draw(a4_outline, invisible);
clip(a4_outline);
}

Loading…
Cancel
Save