• 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: [NSColor clearColor] and NSBezierPath: not compatible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSColor clearColor] and NSBezierPath: not compatible?


  • Subject: Re: [NSColor clearColor] and NSBezierPath: not compatible?
  • From: Stefan Schüßler <email@hidden>
  • Date: Wed, 17 Aug 2005 17:18:13 +0200

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];

Hope this helps.

Stefan

On 17.08.2005, at 16:52, Stephane Sudre wrote:

A look in the archives did not bring back any good answer.

It looks like NSBezierPath fill method does not work with the clearColor.

Filling with another color works fine.

Is this a bug, a limitation or is there a workaround?

From what I can see in the documentation, this limitation is not documented. (Mac OS X 10.3.9)

_______________________________________________ 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
  • Follow-Ups:
    • Re: [NSColor clearColor] and NSBezierPath: not compatible?
      • From: Stephane Sudre <email@hidden>
References: 
 >[NSColor clearColor] and NSBezierPath: not compatible? (From: Stephane Sudre <email@hidden>)

  • Prev by Date: Re: [NSColor clearColor] and NSBezierPath: not compatible?
  • Next by Date: Re: [NSColor clearColor] and NSBezierPath: not compatible?
  • Previous by thread: Re: [NSColor clearColor] and NSBezierPath: not compatible?
  • Next by thread: Re: [NSColor clearColor] and NSBezierPath: not compatible?
  • Index(es):
    • Date
    • Thread