[metapost] pens and number of points

Peter Rolf indiego at gmx.net
Sun Nov 4 21:40:48 CET 2007


Hi,

please excuse my ignorance. Why does MetaPost (1.000) need 18(!) points
for drawing a square with a squared pen, while it only needs (the
expected) four in case of a circled pen? Is this PS related?

    path p;

    p:= unitsquare xyscaled(90,90);
    draw p withpen
    pensquare scaled 10; % 18 points (see ps output)
%    pencircle scaled 10; % 4 points + pen defs(?)


And is there a better way than using fill in this case (8 points)?

    p:= unitsquare xyscaled(100,100);
    fill p;
    p:= unitsquare xyscaled(80,80) shifted(10,10);
    unfill p;

Any help welcome.

Peter


More information about the metapost mailing list