• 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
Re: NSImage ignoring interpolation: Is this a bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage ignoring interpolation: Is this a bug?


  • Subject: Re: NSImage ignoring interpolation: Is this a bug?
  • From: Scott Stevenson <email@hidden>
  • Date: Sat, 25 Nov 2006 15:38:08 -0800

On Nov 25, 2006, at 1:16 PM, Mark Onyschuk wrote:

Just a thought, the -[NSImage compositeToPoint:operation:] is a method from back in the NeXTstep days and has some behaviors that are meant to be compatible with code from the days of Display Postscript.

You might find that the -drawInRect:fromRect:operation:fraction: method (that's new in Mac OS X and Quartz) behaves better for you.

One last post on this for the archives.

It turns out -drawInRect:fromRect:operation:fraction: makes things drastically easier (at least in many cases) than compositeToPoint or dissolveToPoint. There's no need to disable the cache, set scaling, or even set the size! The drawInRect method does all the proper smooth resizing itself.

In many cases, all you have to do this this:

[image drawInRect: destRect
                 fromRect: NSZeroRect
                operation: NSCompositeSourceOver
                    fraction: 1.0];

What was I doing using compositeToPoint for so long?

Thanks, Mark.

    - Scott
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSImage ignoring interpolation: Is this a bug? (From: Scott Stevenson <email@hidden>)
 >Re: NSImage ignoring interpolation: Is this a bug? (From: Mark Onyschuk <email@hidden>)

  • Prev by Date: Re: Repositioning an NSTextFieldCell?
  • Next by Date: Re: Repositioning an NSTextFieldCell?
  • Previous by thread: Re: NSImage ignoring interpolation: Is this a bug?
  • Next by thread: Window menu not displaying open windows?
  • Index(es):
    • Date
    • Thread