• 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
NSRulerView and inches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRulerView and inches


  • Subject: NSRulerView and inches
  • From: Milen Dzhumerov <email@hidden>
  • Date: Thu, 21 Jan 2010 12:30:57 +0000

Hi all,

I'm been involved with an app that has the ability to create documents in various dimensions, including a way where you specify the width and height in inches + the PPI. So, for example, the user can specify a document of size 5in x 5in with 300 PPI. From this definition, I'll have a document of size 1500 points by 1500 points although I'll have to redefine how many points equal one inch for the ruler view.

As NSRulerView already has the definition of 1 inch = 72 points, am I right that I'll have to create a new unit with a random name (could use a UUID) and "in" abbreviation that's defined from the PPI selected by the user? So, in the example case I'll send a msg similar to [NSRulerView registerUnitWithName:@"random unused unit name" abbreviation:NSLocalizedString(@"in", @"Inches abbreviation string") unitToPointsConversionFactor:300.0 stepUpCycle:upArray stepDownCycle:downArray].

Thanks,
M_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSRulerView and inches
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Correct Bindings Practices
  • Next by Date: Re: Standard Alert Note/Warning/Stop icon NSImage Names?
  • Previous by thread: Re: NSPredicateEditor Continuous updating failes
  • Next by thread: Re: NSRulerView and inches
  • Index(es):
    • Date
    • Thread