[metapost] some question about pens
Dan Luecking
luecking at uark.edu
Thu Apr 3 00:22:13 CEST 2008
At 02:02 PM 4/2/2008, Hartmut Henkel wrote:
>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:
I recently noticed that metapost also doesn't get the correct
bounding box for mitered joins. I seems to always take
the bounding box of the path, extended by half the line
thickness (I'm using version 1.002). Of course, miters
can extend .5*(line thickness)*(miter limit) beyond the
path if the join corner is right on the edge.
>prologues := 3;
>beginfig(1);
>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);
>endfig;
>end
This code:
miterlimit := 11;
linejoin := mitered;
draw (0,0)--(72,7)--(0,14) withpen pencircle scaled 2bp;
gives bounding box (-1,-1) to (73,15). That causes both
epstopdf and mptopdf to clip the point off.
Dan
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descarte
More information about the metapost
mailing list