• 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: how to clip inside a path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to clip inside a path


  • Subject: Re: how to clip inside a path
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 29 Oct 2012 06:29:42 -0700

On Mon, Oct 29, 2012, at 06:22 AM, Roland King wrote:
> I have a graphics context and a path and I want to clip everything inside
> the path, ie not display it, and leave everything outside the path
> displayed. The path is simple and doesn't cross itself, for sake of
> example it may as well be a circle. If I start with a clip-free GC and
> set that circle as a clipping path, I'll get the opposite, everything in
> the circle will show, how do I do the other way around? Does it work if I
> set a path at the bound rect of the GC plus my shape in the middle? That
> would seem to have two crossings to get into the shape, one at the bounds
> of the rect, one as you cross the shape, which should mean everything
> inside the shape is 'outside' but does a path at the very extremities of
> the GC, or even outside it, count as 'crossed'?

From the CGContextClip documentation:

> The function uses the nonzero winding number rule to calculate the intersection of the current path with the current clipping path.

So try specifying your control points in the opposite order.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: how to clip inside a path
      • From: Roland King <email@hidden>
References: 
 >how to clip inside a path (From: Roland King <email@hidden>)

  • Prev by Date: Re: ARC question
  • Next by Date: Re: ARC question
  • Previous by thread: how to clip inside a path
  • Next by thread: Re: how to clip inside a path
  • Index(es):
    • Date
    • Thread