Hi,
I have a question about the Quartz user coordinate system. The Apple documentation indicates that the CTM handles the transformation from user space to device space. (In at least one document it says that no math is required.) However, I can't find any information or examples showing how you specify the units to Quartz.
Let's suppose that I want draw a 1.5" x 1.5" square on my output device (window or page.) How does Quartz know that the units in the CGContextAddRect call are inches and not feet, yards, or light-years? (Or millimeters, for that matter.)
If I need to add my own scaling to the CTM, how do I determine the resolution and the units for the output device? I've looked at a number of the example apps, and they all seem to draw their shapes in pixels.
I suspect that I'm just not reading the correct document or examples. If someone could point me to the right ones I'd apreciate the help.
Thanks.
Mark E. Hamilton
I have a question about the Quartz user coordinate system. The Apple documentation indicates that the CTM handles the transformation from user space to device space. (In at least one document it says that no math is required.) However, I can't find any information or examples showing how you specify the units to Quartz.
Let's suppose that I want draw a 1.5" x 1.5" square on my output device (window or page.) How does Quartz know that the units in the CGContextAddRect call are inches and not feet, yards, or light-years? (Or millimeters, for that matter.)
If I need to add my own scaling to the CTM, how do I determine the resolution and the units for the output device? I've looked at a number of the example apps, and they all seem to draw their shapes in pixels.
I suspect that I'm just not reading the correct document or examples. If someone could point me to the right ones I'd apreciate the help.
Thanks.
Mark E. Hamilton