• 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
How to stop NSImage from resizing while calling 'drawInRect' ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to stop NSImage from resizing while calling 'drawInRect' ?


  • Subject: How to stop NSImage from resizing while calling 'drawInRect' ?
  • From: DairyKnight <email@hidden>
  • Date: Sun, 6 Sep 2009 22:23:04 +0800

Hi all,
I'm trying to clip an NSImage, not so sure if this is the right thing to do,
but my solution is
to create a smaller NSImage, and draw the original at point(0,0) with the
user-defined clipping rectangle.

It sounds straight forward, but every time I get a messed up image. Then I
tried:

[myNSImg drawAtPoint:NSMakePoint(0, 0) withInRect:NSMakeRect(0, 0, 100, 100)
ops:copy alpha:1];


And found out NSImage is resizing the clipping rect to match the
destination. Is there anyway to turn this
off?

Thanks.

Regards,
DairyKnight
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to stop NSImage from resizing while calling 'drawInRect' ?
      • From: Dave Keck <email@hidden>
  • Prev by Date: Symbolic Links in Snow Leopard
  • Next by Date: Re: NSMenuItem font size of the keyboard shortcut text
  • Previous by thread: Re: Symbolic Links in Snow Leopard
  • Next by thread: Re: How to stop NSImage from resizing while calling 'drawInRect' ?
  • Index(es):
    • Date
    • Thread