Add outline to a path?

I’m trying to add an outline around this rotary slider tracker. Any ideas how to do it? The tracker is drawn using Path::addCentredArc(), while the outline is currently being drawn with a Path::addPieSegment(), but I’d like rounded ends, like the tracker path has.

image

I know that I can, however difficult it might be, draw the outline using two different centreArcs with minimal thickness, and then add arcs to the end to match the rounded end cap style of the tracker path, but this seems like a lot pain. I’m not sure it will be worth it.

Any ideas?

You can convert a curve to a fillable path using juce::PathStrokeType::createStrokedPath().

Then you can stroke that returned path to draw an outline around your path.

1 Like

Thanks @ImJimmi, this is exactly what I was missing :+1:

1 Like