NSImage Flipping
NSImage Flipping
- Subject: NSImage Flipping
- From: Roberto <email@hidden>
- Date: Thu, 14 Nov 2002 20:29:42 -0700
I'm having a lot of headaches getting certain NSImages to draw right
side up. Everything works fine if I use the compositeToPoint method to
draw the image. However, there are situations where I need to scale the
image, so I have to use drawInRect instead.
When I use drawInRect, the scaling works fine, but the image is drawn
upside down. I've tried calling setFlipped before drawing the image,
but it doesn't seem to make a difference whether the image is flipped
or not -- it still draws upside down.
This is only a problem with certain images. If I create the NSImage
using the initWithPasteboard method, it seems to respect the "flipped"
setting. However, if I create the NSImage using the initWithSize
method, lock the focus and draw into it (eg. draw a bezier shape or
some text), no matter what I do, I can't get it to draw upright using
drawInRect.
Any ideas?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.