• 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: Appending CGPath to CGPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending CGPath to CGPath


  • Subject: Re: Appending CGPath to CGPath
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 15 Apr 2011 21:17:45 -0700

On Apr 15, 2011, at 20:55, Roland King wrote:

> I have a CGPath which represents a small (but somewhat complicated) shape and I want to append a number of them together, connected with straight lines, to form a complete closed shape which I then want to use as a clip region. I thought that CGPathAddPath would do what I wanted as I can easily give it an affine transform matrix to move and rotate the template path and add it several times, however if I understand the documentation correctly, that adds the path as a new subpath, not connecting it up. As I want to use the final path as a clip region that's not going to work, I need one continuous path.

That's not how I'd interpret the documentation. The description of (say) 'CGPathAddCurveToPoint' says: "Appends a cubic Bézier curve to a mutable graphics path". The description of 'CGPathAddPath' says: "Appends a path to onto a mutable graphics path". That suggest they have the same semantics.

For this to work, of course, both paths would need to be open.

Are you seeing different behavior when you try it?

It's possible you may need to do a 'CGMoveToPoint' specifying the last point of the first piece before appending the second piece, but it's also possible that this will create an unwanted 0-length line segment, so you should test out the behavior.


_______________________________________________

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: Appending CGPath to CGPath
      • From: Roland King <email@hidden>
References: 
 >Appending CGPath to CGPath (From: Roland King <email@hidden>)

  • Prev by Date: Appending CGPath to CGPath
  • Next by Date: Re: Appending CGPath to CGPath
  • Previous by thread: Appending CGPath to CGPath
  • Next by thread: Re: Appending CGPath to CGPath
  • Index(es):
    • Date
    • Thread