Re: [NSColor clearColor] and NSBezierPath: not compatible?
Re: [NSColor clearColor] and NSBezierPath: not compatible?
- Subject: Re: [NSColor clearColor] and NSBezierPath: not compatible?
- From: Stephane Sudre <email@hidden>
- Date: Wed, 17 Aug 2005 17:37:40 +0200
On 17 août 05, at 17:18, Stefan Schüßler wrote:
NSBezierPath uses the NSCompositeSourceOver operation, therefore
clearColor does not do anything. You could change the graphics state
in order to clear the path:
NSGraphicsContext *context;
context = [NSGraphicsContext currentContext];
[context saveGraphicsState];
[context setCompositingOperation:NSCompositeClear];
[yourBezierPath fill];
[context restoreGraphicsState];
Thanks for the explanation.
Sadly the setCompositingOperation: is only available on 10.4 and later.
I will look for its sibling in CoreGraphic as suggested by Timothy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden