Re: Annotating on a NSImageView
Re: Annotating on a NSImageView
- Subject: Re: Annotating on a NSImageView
- From: daniel <email@hidden>
- Date: Sat, 30 Oct 2004 11:02:48 -0700
I think you need to do the math yourself. The only "safely"
predictable NSImageView is the one with no borders, no bezel, etc. If
you use this one, the image should take up the entire frame of the
view, so you can just compare the image dimensions with the view
dimension to get an X and Y scale value. If you're using an
NSImageView with borders, then you'll have to take into consideration
the amount of space taken up by the border. Since this can probably
change in a future release, I wouldn't want to depend on any guesses
made regarding that.
Daniel
On Oct 30, 2004, at 10:06 AM, Paul Sargent wrote:
Hi,
I'm wanting to display an image and then add annotations on top of the
image. An example might be a selection marquee in a photo editing
program (not exactly what I'm doing but it gives an idea). My idea was
to subclass an NSImageView, and then in drawRect call [super drawRect]
first and then do some CG* calls to add my annotations.
My problem is that NSImageView will scale the image depending on how
big the view is. How do I know what scaling NSImageView has decided
upon so that I can draw my annotations at the same scale?
Thanks
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
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