The code below draws a 3/4 circle, filled, white, despite the ofSetColor statement.
I tried moving the ofSetColor down, but no joy.
How do I set the arc’s colour?
Second question: the documentation shows a parameter to close the line, but it does not say how to leave it open. And, anyway, it seems the default is closed.
Can it be left open, and if so, how? (Just omitting “close()” does not do it.)
You can use setFillColor() and setStrokeColor() to set colors, and setFilled() to toggle fill. (Mind that the appearance of the stroke, depends on your GPU).
The close() function depends on setStrokeColor() and setPolyWindingMode(). You can enable stroke and then switch between the different winding modes to understand the behavior.
Would you be kind enough to provide examples of setFillColor and setStrokeColor? The documentation isn’t very clear - and when I am sayin I am a beginner, I kid you not … (I did search, but found nothing useful.)
setFillColor(…)
void ofPath::setFillColor(const ofColor &color)
This sets the fill color of the path. This has no affect if the path is drawn as wireframe.
setStrokeColor(…)
void ofPath::setStrokeColor(const ofColor &color)
This sets the stroke color of the path. This has no affect if the path is drawn filled