NSImageView and ZoomFactors
NSImageView and ZoomFactors
- Subject: NSImageView and ZoomFactors
- From: Brian Postow <email@hidden>
- Date: Wed, 18 Aug 2010 18:01:13 -0400
I'm trying to convert my program from IKImageView to NSImageView. I've got displaying images, and rotating without too much trouble.
The two things that IKImageView gave me that I'm having trouble making NSImageView do a similar thing are 1) zooming and 2) the mouse-tools.
1) I can see how to use scaleUnitSquareToSize to zoom, but that doesn't tell me the CURRENT zoom, so that if I want to, say zoom into 1-1 mode (one image pixel = one screen pixel assuming 72DPI screen) or I want to know how zoomed in I currently am, I can't seem to figure this out...
2) I don't see how to change the mouse cursor, or make a select box, or implement the grab tool... can someone point me at some sample code for this?
Also, and this WASN'T easy on IKImageView, but with a lot of help, I got it to work, but is there a trick to getting the scrollView to function? Currently, I zoom in, and it doesn't make the scroll bars appear.
I made the view by creating an NSScrollView, and then changing the content view of the scrollview to be NSImageView...
Am I supposed to do this in another way?
thanks.
Brian Postow
Senior Software Engineer
Acordex Imaging Systems
_______________________________________________
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