title: Move CGPathCreateMutable() so the path stays the same?
body: <p>I have got 9 hexagon sprites across the screen and I have to specify a certain path around them to make their area touchable. I don't want to set the coordinates for every single path respectively, so can't I just use the first path (the hexagons are all the same size) and move its origin to another position (without destroying the shape)? (If i do it now, the CGPathAddLineToPoint(); adds the points of the hexagon from the previous hexagon. I hope I got the idea across ... (see picture... NOTE : The grey octagon on the upper right is the exact same size and shape as the black one)![Move path coordinates and shape][1]</p>
  
  <p>hex2TouchArea=CGPathCreateMutable();</p>
  
  <pre><code>    CGPathMoveToPoint(hex2TouchArea, NULL, 150,157);
      CGPathAddLineToPoint(hex2TouchArea, NULL, 130, 198);
      CGPathAddLineToPoint(hex2TouchArea, NULL, 146, 236);
      CGPathAddLineToPoint(hex2TouchArea, NULL, 195, 236);
      CGPathAddLineToPoint(hex2TouchArea, NULL, 218, 197);
      CGPathAddLineToPoint(hex2TouchArea, NULL, 193, 157);
      CGPathCloseSubpath(hex2TouchArea);
  </code></pre>
  
  <p>here i put a picture that shows it in an image<br>
  <a href="http://666kb.com/i/bz2ysevuw8n65rh3i.gif" rel="nofollow">http://666kb.com/i/bz2ysevuw8n65rh3i.gif</a></p>
  
  <p>*<em>EDIT: I got the solution from the post and changed it a little bit : *</em></p>
  
  <pre><code>-(CGMutablePathRef) drawHexagon:(CGPoint)origin
  {
      //create mutable path
      CGMutablePathRef path = CGPathCreateMutable();
  
      CGPathMoveToPoint(path, nil, origin.x, origin.y);
  
      CGPoint newloc = CGPointMake(origin.x - 20, origin.y + 42);
      CGPathMoveToPoint(path, NULL, newloc.x, newloc.y);
      CGPathAddLineToPoint(path, NULL, newloc.x + 16,newloc.y + 38);
      CGPathAddLineToPoint(path, NULL, newloc.x + 49, newloc.y + 0);
      CGPathAddLineToPoint(path, NULL, newloc.x + 23,  newloc.y - 39);
      CGPathAddLineToPoint(path, NULL, newloc.x - 25,newloc.y - 40);
      CGPathAddLineToPoint(path, NULL, newloc.x -43, newloc.y + 0);
      CGPathCloseSubpath(path);
      return path;   
  
  }
  </code></pre>