• 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
NSImage Flipping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: [resend]:sending an email with cocoa
  • Next by Date: Transparent NSTextField and annoying black square
  • Previous by thread: Re: Finding keyWindow...
  • Next by thread: Transparent NSTextField and annoying black square
  • Index(es):
    • Date
    • Thread