Crooked Spin

Programming

March 9, 2006

Hole Punching

Just a reminder note for if I ever run into the issue (or want the effect).  NSRectFill sets the current color to the pixels of a rect replacing anything below them.  So if you use a color with an alpha value less then 1, a “hole” will be punched completely through the window.  An NSBezierPath ([[NSBezierPath bezierPathWithRect: rect] fill]) or NSRectFillUsingOperation(NSRect aRect, 
NSCompositingOperation op) should be used instead.

Leave a comment

RSS feed for comments on this post. TrackBack URL

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>