Re: drawing flipped images
Re: drawing flipped images
- Subject: Re: drawing flipped images
- From: "Jam Chen" <email@hidden>
- Date: Mon, 5 Jul 2004 23:48:01 +0800
- Thread-topic: drawing flipped images
Hi,
I think you could try to setFlipped and restore the value after you done
the image drawing.
for instance:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
BOOL oldValue = [m_Image isFlipped];
[m_Image setFlipped:[controlView isFlipped]];
// draw the image
[m_Image setFlipped:oldValue];
}
James
------------------------------------
Ulead Systems Inc.
James Chen
Software Engineer
Image Div.
------------------------------------
On Jul 5, 2004, at 2:21 PM, Chuck Soper wrote:
Hello,
I have several hundred small images. Each image I draw both in an
NSImageView instance and in a subclass of NSCell. When I draw the image
in the NSCell subclass (using -(BOOL)drawInRect:(NSRect)rect;) it's
upside-down, of course. I understand that I could send setFlipped:YES to
the image, but then it'd be upside-down in the NSImageView instance.
What is the best solution for this issue? Do I need two copies of each
image in memory, one flipped and one not flipped? Or, is there an easier
better way?
Thanks,
Chuck
_______________________________________________
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.
_______________________________________________
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.