• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSImageView


  • Subject: Re: Custom NSImageView
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 30 Dec 2005 02:44:27 -0500


On Dec 30, 2005, at 1:34 AM, Robert Walker wrote:

Lee,

Thanks for your quick response. I've looked at core image, which is really great. It's a bit overkill for my needs. I'm basically just viewing faxed TIFF images from our document imaging server. I was just using NSAffineTransform to do the zooming, which seemed to work okay.

My problem is actually with the mechanics of adding the listed features to my custom image view. By default NSImageView draws it's content from the lower left corner (or I guess upper left if it is flipped).


Honestly, I'm not sure that you gain much at all by starting with NSImageView and trying to add your features to it. Instead you could start with an NSView and subclass that. NSImageView is going to be more complicated, because it is actually a control, and NSImageCell does most of the work.

I don't know of any built-in support for zooming using a selection rectangle and positioning the transformed image properly in the view, switching from pan mode to zoom mode, etc.

all of this would have to be handled by your custom view subclass.. have a look at the event handling documentation for how to handle mouse down, mouse drag, mouse up events (for a selection rectangle) and dragging for repositioning.

pan and zoom mode switching is an interesting UI issue. should it be modifier keys? or should the custom image view be 'set' into a mode from some external control, so you only need to worry about implementing the behavior based on which mode it is in.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Custom NSImageView (From: Robert Walker <email@hidden>)
 >Re: Custom NSImageView (From: Lee Morgan <email@hidden>)
 >Re: Custom NSImageView (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: Custom NSImageView
  • Next by Date: Undefined Symbols during Linking
  • Previous by thread: Re: Custom NSImageView
  • Next by thread: Undefined Symbols during Linking
  • Index(es):
    • Date
    • Thread