• 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: NSBezierPath vs. NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath vs. NSImage


  • Subject: Re: NSBezierPath vs. NSImage
  • From: Rob Keniger <email@hidden>
  • Date: Sat, 12 Dec 2009 11:33:59 +1000

On 11/12/2009, at 8:59 PM, Alastair Houghton wrote:

> Anyway, the thing to do is to draw what you want, and then *if* it's going too slowly there are various things you can do to speed it up (like caching any expensive rendering in an NSImage, doing reduced or simplified rendering during live resize and so on).


It's also worth considering looking at Core Animation Layers, depending on what you're drawing. I have a custom view with several objects that are expensive to draw, and what I am now doing is drawing them into CALayers. Because these are cached to the GPU, there is virtually no cost to dragging the objects around as the only time they need to be redrawn is when the content of the objects changes.

Since my objects are overlaid on a large image background (at least 1000 x 1000), drawing was very expensive before I did this as the image needed to be redrawn any time the view content changed. With CALayers it is only drawn once.

--
Rob Keniger



_______________________________________________

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

References: 
 >NSBezierPath vs. NSImage (From: Michael Abendroth <email@hidden>)
 >Re: NSBezierPath vs. NSImage (From: Alastair Houghton <email@hidden>)
 >Re: NSBezierPath vs. NSImage (From: Michael Abendroth <email@hidden>)
 >Re: NSBezierPath vs. NSImage (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Bluetooth failure
  • Next by Date: Sqlite3 R*Tree module and the iPhone
  • Previous by thread: Re: NSBezierPath vs. NSImage
  • Next by thread: [iPhone] Animate tableView reloadData
  • Index(es):
    • Date
    • Thread