[metapost] drawdot issue

Stephan Hennig mailing_list at arcor.de
Sun Mar 13 11:45:35 CET 2011


Hi,

the attached file contains three variants of drawing a dot of size 10bp
with the drawdot command.  I would expect all variants to have the same
output.  However, all dots have different size, only the first variant
giving the correct result (tested with MetaPost v1.211 and v1.503).

Looking at the PostScript code and HiResBoundingBox header for the
second and third variant, as soon as a withpen statement is given to the
drawdot command, a circle of the requested size is not only filled, but
it is also stroked with the pen given to withpen.  Which makes for a dot
that is too large.

As there is no syntax diagram for drawdot in the manual, I don't even
know if a withpen statement is valid for drawdot.  But it would be very
unintuitive, if not.

Best regards,
Stephan Hennig


prologues := 3;
beginfig(1);
  pickup pencircle scaled 10;
  drawdot origin;
endfig;
beginfig(2);
  pickup pencircle scaled 1;
  drawdot origin withpen pencircle scaled 10;
endfig;
beginfig(3);
  pickup pencircle scaled 10;
  drawdot origin withpen pencircle scaled 10;
endfig;
end



More information about the metapost mailing list