[metapost] How to use a thinner pen?
luecking at uark.edu
Wed Jun 18 17:27:07 CEST 2008
At 03:22 AM 6/18/2008, you wrote:
>My tuppence worth.
>Note that for MP 0.0000000000000001pt; = 0pt; indeed, in the resulting
>file you have the following relevant statement
> 0 0 dtransform truncate idtransform setlinewidth pop
>which "picks up" a PostScript pen of width 0.
>According to the PostScript Language specification, lines having thickness
>explicitly 0 are displayed as 1-pixel ones:
> A line width of 0 is acceptable, and is interpreted as the
> thinnest line that can be rendered at device resolution --
> 1 device pixel wide. However, some devices cannot reproduce 1-pixel
> lines, and on high-resolution devices, they are nearly invisible.
> Since the results of rendering such "zero-width" lines are
> device-dependent, their use is not recommended.
> The actual line width achieved by stroke can differ from the
> requested width by as much as 2 device pixels, depending on the
> positions of lines with respect to the pixel grid.
My understanding (take with a grain of salt as it has been some
years since I looked at the PS language reference) is that, unless
adjustments are made, a PS renderer will paint any pixel that is
touched by the pen. Probably PDF uses a similar rule, but I am not
at all sure of that. (This is in contrast to MetaFont, where a pixel
is turned one if its center is touched by the pen. Thus MetaPost
figures can be quite a bit darker than a MetaFont bitmaps drawn with
the same code.)
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descarte
More information about the metapost