Circle drawing with stroke and fill color.

How to draw a circle using CGContextAddArc with different colors and color printing?

+3
source share
1 answer

Wouldn’t it be like this job?

CGContextAddArc(ctx, x, y, 1.0, 0, 2 * Pi, 1); // Or is it 2 * M_PI?

CGContextSetFillColorWithColor(ctx, fillColor);
CGContextSetStrokeColorWithColor(ctx, strokeColor);
CGContextDrawPath(ctx, kCGPathFillStroke);
+7
source

Source: https://habr.com/ru/post/1754944/


All Articles