Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

My partial circle looks weird

$
0
0

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.

    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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>