Two level quartz alignment

Is it possible to adjust the default center alignment when using kCGPathFillStroke as the drawing mode?

For example, when drawing a closed path using:

CGContextDrawPath(context, kCGPathFillStroke);

The stroke lies at 50% outside / 50% inside the elongated path. The color of the stroke has opaque alpha, so a pure effect is undesirable. I want the blow to lie either inside or outside.

The only possible way that I see in this is to rebuild the path, reduced by 50% of the stroke width.

+3
source share
1 answer

Your guess is correct. Adjust the position of the path.

0
source

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


All Articles