• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What units are in effect when drawing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >What units are in effect when drawing? (From: Tito Ciuro <email@hidden>)

  • Prev by Date: Showing NSView's contextual menu on mouse down
  • Next by Date: Re: What units are in effect when drawing?
  • Previous by thread: What units are in effect when drawing?
  • Next by thread: Re: What units are in effect when drawing?
  • Index(es):
    • Date
    • Thread