Drawing an NSImage in a view with flipped coordinates
Drawing an NSImage in a view with flipped coordinates
- Subject: Drawing an NSImage in a view with flipped coordinates
- From: Derrick Griffel <email@hidden>
- Date: Mon, 28 Feb 2005 13:49:42 -0600
I'm trying to draw an image in a view that has flipped coordinates. My
view has to have flipped coordinates because I am using rulers and I
would like the origin of the rulers in the upper left corner. I was
originally using [NSImage setFlipped:YES] prior to locking focus,
creating a new NSImageRep, unlocking focus, and then using [NSImageRep
drawInRect]. This resulted in my image getting drawn correctly with
one exception. Using this design, some EPS images would not scale up
correctly. To overcome the scaling problem, I added a call to [NSImage
setDataRetained:YES]. This fixed the scaling problem, however, none of
the images obey the setFlipped flag anymore resulting in all my images
being drawn upside down. If I remove the call to setDataRetained, the
images are once again drawn in the correct orientation, but then I am
still faced with the scaling problem with certain EPS images.
Does anyone have any ideas on what I am doing wrong?
Thanks,
Derrick Griffel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden