|
From: | Andreas Hoeschler |
Subject: | Re: Extracting from NSImage (NSImageView) |
Date: | Thu, 3 Jun 2004 23:18:08 +0200 |
I do not whether NSImageView can be used for this purpose,
but, as far as I understand, cropping is the job of NSImage class.
I think you can use Cocoa's method
[NSImage -compositeToPoint:fromRect:operation:fraction:]
If you want to create an image from a portion of original one,
you need to calculate the new size, create this new image and
then draw _on it_ by locking focus:
[newImage lockFocus];
[originalImage compositeToPoint: ....];
[newImage unlockFocus];
I say "I think" because I never used Cocoa,
and
[NSImage -compositeToPoint:fromRect:operation:fraction:]
was not implemented in GNUstep the last time I checked.
Does anybody know why it's not implemented?
[Prev in Thread] | Current Thread | [Next in Thread] |