Re: Pasting NSImage problems
Re: Pasting NSImage problems
- Subject: Re: Pasting NSImage problems
- From: Development <email@hidden>
- Date: Sun, 14 Oct 2007 22:49:49 -0700
Hmm, I don't think I explained correctly then. I HAVE subclassed
NSImageView to add in all the things I need it to do such as rotation
and cropping (which work). I thought that the code I had posted was
interacting directly with the image, and then only asking the
imageview to display it. Where my code is failing is that Although it
picks the image up off the clipboard correctly, I cannot get it to
draw the pasted image. Now if I simply pull the image off the
clipboard and tell the custom view setImage: then the image displays
but the image it should be pasted on is of course replaced.
On Oct 14, 2007, at 8:19 PM, Erik Buck wrote:
Just subclass NSView directly, add an instance
variable or two to store the images you want to draw,
and implement -drawRect to draw them. NSImageView
isn't doing anything magic, and it sounds like what
you want is sufficiently different from NSImageView
that a there is no point in starting with NSImageView.
If you are drawing multiple images or want to drag
images, you might as well jump in and learn how to do
it. NSImageView is a simple class for use in simple
situations. NSView is the general purpose base class
for drawing and responding to user input.
_______________________________________________
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:
40fornextsoft.com
This email sent to email@hidden
_______________________________________________
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