Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shiny little square buttons




On Jul 3, 2006, at 2:04 PM, Gerd Knops wrote:


On Jul 3, 2006, at 4:23 AM, Uli Kusterer wrote:

NSRectFill & Co. are for *replacing* a color in a rect (e.g. to reset the alpha channel of an NSImage). Why does everybody insist on using the functions when we have a perfectly good fillRect method in NSBezierPath?

Uli, I don't see the word "replace" used in the docs. Where did you read that?


And the difference/reason to use one over the other would be? They both fill a rectangle with a color, right?

Exactly. There may have been a thread a while back in comparing the performance of NSFillRect and NSBezierPath.fillRect. Can't find it though via brief googling.


I use NSRectFill and its sibling NSRectFillUsingOperation all the time. For better performance, one can also use the "FillList" variations on those APIs. I only use NSBezierPath for non-rectangle stuff.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Shiny little square buttons (From: Nik Youdale <email@hidden>)
 >Re: Shiny little square buttons (From: Jeremy Dronfield <email@hidden>)
 >Re: Shiny little square buttons (From: Nik Youdale <email@hidden>)
 >Re: Shiny little square buttons (From: Uli Kusterer <email@hidden>)
 >Re: Shiny little square buttons (From: Gerd Knops <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.