On Nov 12, 2009, at 2:26 PM, Mirko Viviani wrote: > On 12/ago/2009, at 21.30, David Duncan wrote: > >>> From my experience on Windows, DPIHeight and DPIWidth are properties of the >>> display device the image is drawn on, and not properties of the image >>> itself. >> >> They are properties of both. In the case of printing, you are using a fixed >> grid at 72 PPI. Your source image of course has its own DPI that determines >> the actual size of the image in real world units. You combine the two to >> print or display an image at its natural size. > > Do you mean that there is no way to print an image using a grid of 300 PPI > with Cocoa/Quartz? > If not, why? Alternatives?
Just like with all CGContexts you can apply a transform matrix to change the coordinate system. However in general this isn't necessary. If you want an image to display in a 1" x 1" area on screen, draw it into a 72x72 box. The pixel size of the image will determine DPI. If you wanted to draw a 1" image at 300 DPI then you would just need a 300x300 image drawn into a 72x72 box. If you wanted to draw a 1" image at 600 DPI then you would need a 600x600 image drawn into the same 72x72 box. -- David Duncan Apple DTS Animation and Printing _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com