Re: What units are in effect when drawing?
Re: What units are in effect when drawing?
- Subject: Re: What units are in effect when drawing?
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 5 Apr 2003 14:55:28 -0800
On Saturday, April 5, 2003, at 07:44 AM, Tito Ciuro wrote:
Hello,
What are the default units when drawing in a custom view? Picas?
Points? mm? Also, is there a helper to aid converting between units?
Nominally, they're printer's points (72 points/inch). If you don't
alter the coordinate space, on all current Mac displays, integer
coordinates will land between screen pixels. On higher-resolution
displays like the current 15" powerbook, the actual size will be
smaller.
If you need to know the physical properties of the device you're
rendering on, you can use the NSGraphicsContext method to get the
CGContextRef, and query that for the pixel density, etc.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.