• 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: drawing with clearColor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?


References: 
 >drawing with clearColor (From: Ben Chess <email@hidden>)

  • Prev by Date: Re: ObjC Method naming
  • Next by Date: NSRootTask 0.0.1
  • Previous by thread: drawing with clearColor
  • Next by thread: NSRootTask 0.0.1
  • Index(es):
    • Date
    • Thread