Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!gillies From: gillies@m.cs.uiuc.edu (Don Gillies) Newsgroups: comp.sys.mac.apps Subject: Re: Pasting Graphics into MS-Word! : Toolbox Bug! Message-ID: <1991Jun8.065840.13795@m.cs.uiuc.edu> Date: 8 Jun 91 06:58:40 GMT References: <1991Jun7.100530.24764@m.cs.uiuc.edu> Distribution: comp Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 42 Actually, after reading Inside Macintosh some more, I think there is a fundamental flaw in the architecture of quickdraw. The five primitives Rectangle, RoundRectangle, Oval, Arc, and Region are all specified to fall *within* a rectangular frame. The other two primitives Line and Polygon, paint below and to the right of the display path. The objects that are below and to the right paint correctly; this is because when two objects that overlap along some border, the display path is exactly the same. So you could increase only the pen size and the two objects would continue to be aligned. And when you multiply each integer coordinate by some constant scale factor and round it, you get exactly the same intersection path for both objects (since the coordinates are the same). However, for two Rectangles (etc.) that overlap along some border, and that overlap at resolution x, the display paths are different. The intersection of the interiors of both Rectangles is actually non-empty; it is precisely the line segment of overlap. Consider increasing the pen size; for every increase of 1 pixel in width, you get an extra pixel inside each rectangle, leading to misalignment. When you scale these two rectangles up to 300dpi, roundoff error occurs. Since the (x,y) coordinates of both paths differ, the rounding might be different for both paths. Furthermore, the pen size may turn out to be something like 2.49, which is rounded down to 2 pixels. This results in very serious misalignment after the scaling. The result is that you get a thick line at the border of the two rectangles, i.e. On 72dpi device: Scaled for 300dpi device: +---+ +---+ | | | | +-+-+---+ -> +-+=+---+ | | | | +-----+ +-----+ Don Gillies | University of Illinois at Urbana-Champaign gillies@cs.uiuc.edu | Digital Computer Lab, 1304 W. Springfield, Urbana IL --