On Sat, Nov 22, 2008 at 1:36 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > While we're on the subject, I was wondering... does NSBitmapImageRep has an > equivalent to NSImage's > > drawInRect: fromRect: operation: fraction: > > > Problem is... the ImageRep technique works well when I'm just scaling an > image..it's quite fast too, however I am also cropping (in some cases)... > and unfortunately, without the "fromRect" parameter, it's pretty much > impossible to crop... right now I'm drawing my ImageRep in an intermediate > NSImage so that i can use drawInRect: fromRect: when cropping but it takes > tons of time (like 2-3x the time it takes by using just an ImageRep...) > being able to use drawInRect: fromRect on an ImageRep would save me ton of > time and headaches...
You can crop any drawing you wish by using the -[NSBezierPath addClip] method. That NSImage allows you to do it inline is really just a convenience. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]