NSRulerView and inches
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