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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to