Necesito dibujar un hexágono y rellenarlo con una construcción de color con una imagen como patrón. que hice: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);
embargo, dependiendo de la orden de CGContextStrokePath y CGContextFillPath, consigo un hexágono limita pero no llena o llena pero no confinado. ¿Cómo puedo arreglar esto?
aumentar el ancho en CGContextSetLineWidth .. –