[metapost] some question about pens

Stephan Hennig mailing_list at arcor.de
Mon May 5 16:32:56 CEST 2008


Hartmut Henkel schrieb:

> if you comment out the linecap line, you get a tight bounding box.

Except for the amount of bboxmargin, which is 2bp by default.  A
modified example is

bboxmargin := 0;
beginfig(1);
path qc;
  qc := quartercircle scaled 200;
  linecap := squared;
  draw qc withpen pencircle scaled 50;
  draw bbox(currentpicture) withpen pencircle scaled 0 withcolor red;
endfig;
end

which gives

  %%BoundingBox: -33 -33 133 133
  %%HiResBoundingBox: -32.6644 -32.6644 132.6644 132.6644

instead of

  %%BoundingBox: -25 -25 125 125
  %%HiResBoundingBox: -25 -25 125 125

as for a rounded pen.

Best regards,
Stephan Hennig


More information about the metapost mailing list