Silly question of the day, how do I draw an arc without drawing an additional line?

I don’t usually raise this kind of silly questions, but I’m already fasting pissed off after a while and I can’t waste another minute on this absurdity.

I want to draw an arc but I can’t get rid of the damn line that is drawn from the end point of the arc to the 0,0 point.

        juce::Path arcPath;
        arcPath.addCentredArc(50, 50, 40, 40, 0, 1.0f, true); //  the line appears with true or false
        g.strokePath(arcPath, juce::PathStrokeType(1.0f));

Can it be that you forgot a parameter and are not getting a warning because the optional bool (startAsNewSubPath) is being cast to a float (toRadians)? The function takes seven floats, yours has six.

1 Like

this is :+1: