How to stop NSImage from resizing while calling 'drawInRect' ?
How to stop NSImage from resizing while calling 'drawInRect' ?
- Subject: How to stop NSImage from resizing while calling 'drawInRect' ?
- From: DairyKnight <email@hidden>
- Date: Sun, 6 Sep 2009 22:23:04 +0800
Hi all,
I'm trying to clip an NSImage, not so sure if this is the right thing to do,
but my solution is
to create a smaller NSImage, and draw the original at point(0,0) with the
user-defined clipping rectangle.
It sounds straight forward, but every time I get a messed up image. Then I
tried:
[myNSImg drawAtPoint:NSMakePoint(0, 0) withInRect:NSMakeRect(0, 0, 100, 100)
ops:copy alpha:1];
And found out NSImage is resizing the clipping rect to match the
destination. Is there anyway to turn this
off?
Thanks.
Regards,
DairyKnight
_______________________________________________
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