chrisg@microsoft.UUCP (Chris GUZAK) (02/09/90)
How is the postscript device space pixel grid defined. If you are at device coordinate 0,0 are on at the center point of a pixel or on the upper left corner (on the box that bounds the pixel)? Also, how does clipping work in device space? When you trace a path over some device coordinates (given the answer to the above question) when do pixels get set or not (is the clipping inclusive of the path or exclusive)? The specific example that I am curious about is for the case of a rect, 1 pixel in height. 0 0 moveto 10 0 rlineto 0 1 rlineto -10 0 rlineto closepath clip Assumiming you are have set up CTM so that device coordinates map to user coordinates (and the reverse) what is the result when you draw over the above clipping path? Chris Guzak
larry@csccat.UUCP (Larry Spence) (02/10/90)
In article <10511@microsoft.UUCP> chrisg@microsoft.UUCP (Chris GUZAK) writes: >How is the postscript device space pixel grid defined. If you >are at device coordinate 0,0 are on at the center point of a >pixel or on the upper left corner (on the box that bounds the >pixel)? > ... other off-by-one inclusive/exclusive questions ... I would recommend taking a look at the Display PostScript documentation. The things you're asking about were not really defined well in "printer" PS, but the DPS documentation takes pains to explicitly define the pixels that are set when you do a stroke, etc. The question then becomes, how much of this applies to current and older implementations? Well, the DPS manuals say something to the effect of "this is the latest technology, all products based on this technology from here on out will behave as we have described." Best bet is to look at the DPS docs, then write test programs to see what actually happens on, say, a LaserWriter. I think that the idea with printer PS was that it's implementation-dependent as to which pixels get set when things are rasterized, as long as it's all consistent. With the introduction of DPS, they decided they really did need to be explicit about what happens at the device level. These are my opinions, based on scrutiny of the various PS docs. Maybe someone from Adobe can offer a more definitive answer. -- Larry Spence larry@csccat ...{texbell,texsun,attctc}!csccat!larry