Potrzebuję narysować sześciokąt i wypełnić go kompozycją kolorów z obrazem jako wzorem. zrobiłem:CoreGraphics FillPath and Stroke Path
CGContextSaveGState(context);
CGContextSetLineCap(context, kCGLineCapRound);
CGContextSetFillColorWithColor(context, [[UIColor colorWithPatternImage:[UIImage imageNamed:@"patternerba.png"]] CGColor]);
CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]);
CGContextSetLineWidth(context, 3.0);
// drawing hexagon here...
CGContextStrokePath(context);
CGContextFillPath(context);
[[NSString stringWithFormat:@"Foo"] drawAtPoint:innerRect.origin withFont:[UIFont fontWithName:@"Helvetica" size:16]];
CGContextRestoreGState(context);
ale w zależności od kolejności CGContextStrokePath i CGContextFillPath, otrzymuję sześciokąt graniczy ale nie wypełnione lub wypełnione, ale nie graniczy. Jak mogę to naprawić?
zwiększyć szerokość w CGContextSetLineWidth .. –