Hello! I am trying to implement a simple vector graphics editor. I have some thoughts on how to implement the elements positioning, storage and select-ability.
The problem is i don't know how would it be right to implement Zooming (similar to how graphics editors do it - by allowing the user to select some area of the view with a selection rectangle, and, after the mouseUp event happens, zoom in or out the view that is contained within an NSScrollView. I still need the original coordinates to be preserved (like, if the user clicks on a pixel with original coordinates (1;1), on a 10-times zoomed in view the click on (10;10) should result in (1;1) in the method mouseDown, for example). I tried looking at Sketch sample, but its code is actually scary for a newbie, especially when they use Cocoa Bindings so heavily. Could you give me some high-level ideas? As far as I understood, a "Sketch" sample implements this by subclassing an NScrollView. So maybe there's some simple way? Or should I implement everything by hand (including this coordinates transformation (scaling of every mouse event and drawing events)? Thank you! _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com