Geometry Drawing Issues



I am having trouble getting ellipses to line up with the control points of a path I'm drawing:


Is there a way to specify the center of an ellipse? or are the path points off?



    juce::Path ssCurve;
    ssCurve.startNewSubPath(0.f, getHeight());
    for (auto& pt : mDrawPts) {
        ssCurve.lineTo(pt.x, pt.y);
        g.drawEllipse(pt.x, pt.y, 5.f, 5.f, 1);

Is this because the ellipse point is the lower left, not center?

The position is the ellipse's upper left corner, actually.

Just write it yourself:

void drawControlPoint (Graphics& g, float x, float y, float radius, float lineThickness)
    g.drawEllipse (x - radius, y - radius, 2.0f * radius, 2.0f * radius, lineThickness);