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

My partial circle looks weird

$
0
0

its the stroke width: small but thick lines don't get placed together correlcty (google for line caps and joins).

You can workaround this by making a shape comprised of 2 arcs (inner & outer); finally filling the shape with a color.

Eg:

		ofPath p;
	p.setArcResolution(100);
	p.arc(0,0,circleRadiusOuter-7,circleRadiusOuter-7, 0, 360.*percentage);
	p.arcNegative(0,0,circleRadiusOuter,circleRadiusOuter, 360.*percentage, 0);
	p.close();
	p.setFilled(true);
	p.setUseShapeColor(true);
	p.setColor(ofColor(0,153,0,255));
	p.setFillColor(ofColor(0,153,0,255));
	p.setStrokeColor(ofColor(0,153,0,255));

Viewing all articles
Browse latest Browse all 40524

Trending Articles



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