[metapost] some question about pens

Hartmut Henkel hartmut_henkel at gmx.de
Wed Apr 2 21:02:06 CEST 2008

On Wed, 2 Apr 2008, Taco Hoekwater wrote:

> Scratch the 'almost' here. It does exactly what I expected.

metapost doesn't calculate the bounding box right in this case, see:

prologues := 3;
path hc;
  hc := halfcircle scaled 200;
  linecap := squared;
  draw hc shifted (150,300) withpen pencircle scaled 50;
  draw bbox(currentpicture) withcolor red;
  currentpicture := currentpicture shifted -llcorner(currentpicture);

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

Regards, Hartmut

More information about the metapost mailing list