Re: drawing with clearColor
Re: drawing with clearColor
- Subject: Re: drawing with clearColor
- From: Tom Waters <email@hidden>
- Date: Mon, 28 May 2001 14:11:53 -0700
Probably because when you fill, it is using the SourceOver composite
operation, which is a NOP with clearColor.
D <- S * a + D * (1 - a) translates to D <- 0 * 0 + D * (1 - 0) -or-
D <- D.
I'm not sure how to set the operation using BezierPath, but if you
wanted to have a square hole in your window, I bet this would work.
NSRectFillUsingOperation(theRect, NSCompositeClear);
I would like to know how to change composite modes for use with beziers
as well. I searched and only found references to NSCompositingOperation
in NSGraphics.h (which has the function above), and NSImage, for
compositing images.
How does one, for example, draw an oval which is ATop?
I would expect NSBezierPath to have
fillWithOperation:(NSCompositingOperation)op method.
On Monday, May 28, 2001, at 01:20 PM, Ben Chess wrote:
>
Hi,
>
>
I've been playing around with the RoundTransparentWindow sample from
>
Apple's sample code site. Instead of using NSRectFill() to "paint" in
>
the clear background I tried leaving the background solid and making a
>
transparent hole in the middle of it. Curiously, when I try
>
>
[[NSBezierPath bezierPathWithOvalInRect:theRect] fill]
>
>
with clearColor, nothing really happens. Why is this?