Quantcast
Viewing all articles
Browse latest Browse all 40524

My partial circle looks weird

I've pasted the code below. the end result is broken partial circle (with correct angle and position), and the color is always white. it looks like i went into mspaint and used the spraycan. I assume it's something to do with the circle resolution.

Image may be NSFW.
Clik here to view.

    ofSetColor(ofColor::fromHex(0x876765));
    ofPath path;
    path.setCircleResolution(360);
    //path.setCurveResolution(255);
    ofPoint startPoint(moon.GetDrawPoint());
    startPoint.x -= sin(180 - m_fFirstBound) * m_radius;
    startPoint.y += cos(180 - m_fFirstBound) * m_radius;
    path.moveTo(startPoint);
    path.arc(moon.GetDrawPoint(), m_radius, m_radius, m_fFirstBound - 90, m_fSecondBound - 90);
    path.setFilled(false);
    path.setStrokeWidth(7);
    path.draw();

Viewing all articles
Browse latest Browse all 40524

Trending Articles