Re: NSRulerView and inches
Re: NSRulerView and inches
- Subject: Re: NSRulerView and inches
- From: Quincey Morris <email@hidden>
- Date: Fri, 22 Jan 2010 03:31:13 -0800
On Jan 21, 2010, at 16:26, Graham Cox wrote:
> Note that rulers automatically deal with the view's zoom so you don't normally have to factor that in manually.
>
> I'd say that letting the view do the scaling is definitely the easiest way to do it, through its -scaleUnitSquareToSize: method. It's true that elements such as selection handles and whatnot probably need to compensate for the view scale in the opposite direction, but it's probably better to apply that "unzooming" to the selection handles when they are drawn as a special case rather than the general scalable content.
I'm taking the middle ground. I think both approaches are perfectly feasible, and I'd choose the one, in any given project, that takes less lines of code. I suspect that in DrawKit, most of what you draw is "content" that needs to be scaled, but in the project where I futzed around with this, most of what I drew was "structural" and didn't need to have its line thicknesses, handles, etc scaled. We each chose the perfect approach for the problem at hand, did we not?? ;)
_______________________________________________
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