• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Drawing an NSImage in a view with flipped coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Drawing an NSImage in a view with flipped coordinates
      • From: Ricky Sharp <email@hidden>
    • Re: Drawing an NSImage in a view with flipped coordinates
      • From: Andrew Platzer <email@hidden>
  • Prev by Date: Re: Obtaining keyboard rate & delay metrics
  • Next by Date: Re: Drawing an NSImage in a view with flipped coordinates
  • Previous by thread: Re: Handle AppleScript command using a delegate
  • Next by thread: Re: Drawing an NSImage in a view with flipped coordinates
  • Index(es):
    • Date
    • Thread