• 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: Cocoa graphics speed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa graphics speed


  • Subject: Re: Cocoa graphics speed
  • From: Marco Scheurer <email@hidden>
  • Date: Tue, 30 Sep 2003 11:35:50 +0200

On Tuesday, September 30, 2003, at 12:54 AM, Alastair J.Houghton wrote:

On Monday, September 29, 2003, at 11:18 pm, Chris Hanson wrote:

One way to speed up your code would be to create a real NSBezierPath for the rectangle, and keep the path itself around.

Are you sure? I'm pretty certain that NSRectFill() is faster than using an NSBezierPath to draw the same rectangle, even if you don't create the NSBezierPath every time.

You can get quite a good performance increase (about 10 times) by using NSRectFillList() rather than NSRectFill(), assuming that it's possible to sort the rectangles by colour. If it isn't possible to do that, then NSRectFillListWithColors() is still faster than NSRectFill() by a fair margin.

Yes, NSRectFillList() is a fast way of drawing many rectangles (see http://cocoa.mamasam.com/COCOADEV/2003/01/1/53404.php )

Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch
_______________________________________________
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.

References: 
 >Re: Cocoa graphics speed (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: Using NSImage/NSBitmapImageRep stuff in command line tools
  • Next by Date: Re: files icons
  • Previous by thread: Re: Cocoa graphics speed
  • Next by thread: Re: Cocoa graphics speed
  • Index(es):
    • Date
    • Thread