2

I am trying to draw CGPaths using CAShapeLayer. I want to change the color of the parts where lines are intersected.

Following screenshots explain the goal easier.

http://a5.mzstatic.com/us/r1000/046/Purple/a3/9b/29/mzl.pocvbqdb.320x480-75.jpg

http://a3.mzstatic.com/us/r1000/037/Purple/1d/54/44/mzl.dpijulvx.320x480-75.jpg

Can Leloğlu
  • 271
  • 1
  • 4
  • 11

1 Answers1

0

Check @Alex Nichol's Answer on this post, How to determine intersection of CGPaths .

He developed an Open Source solution to CGPath collision detection, as well as a youtube video showing it in Action.

Hope this helps !

Community
  • 1
  • 1
skram
  • 5,314
  • 1
  • 22
  • 26
  • I checked that solution and tried the code but it does not work for me. That code only returns one pixel of the intersected parts, if lines have width more than 1 pixel there is no straightforward way to change whole intersected part's color. I need something to burn colors somehow. – Can Leloğlu Jun 09 '12 at 18:21