On 23-10-2011 17:17, Peter Rolf wrote:
If I want to test the bounding box of a graphic, I normally use a small debugging macro (last code line of nearly all of my graphics). It simply draws a small red frame at the bounding box borders. You can use the 'Measuring Tool' in Acrobat (also Reader?) or even better the 'Object Inspector' to get the exact size.
minlinewidth:= .143pt;
def wirepen= pencircle scaled minlinewidth enddef ;
def drawbb = drawoptions() ; interim linejoin:= mitered; draw (llcorner currentpicture) shifted ( .5minlinewidth, .5minlinewidth) -- (lrcorner currentpicture) shifted (-.5minlinewidth, .5minlinewidth) -- (urcorner currentpicture) shifted (-.5minlinewidth,-.5minlinewidth) -- (ulcorner currentpicture) shifted ( .5minlinewidth,-.5minlinewidth ) -- cycle withpen wirepen withcolor red; % draw boundingbox currentpicture withpen wirepen withcolor red ; % was not neutral! enddef ;
draw boundingbox currentpicture enlarged -.5minlinewidth withpen wirepen withcolor red ;
My fault. In the meantime I have checked it and 'sp' is not a predefined constant in MP (couldn't find it in the manual). Also never used it in MP.
1 = 1pt = 65536sp
sp's would overflow anyway Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------