Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

ofPolyline arcs rendering with "corners"/divots with line width greater than 1

$
0
0

@a__ wrote:

I’m trying to draw empty circles with strokes thicker than 1px. Using ofPolyline but it’s rendering with these weird little divots in its 4 “corners”:

    ofPoint pos = ofPoint(100, 100);
    int rad = 40;

    ofSetColor(255, 0, 0);
    ofNoFill();
    ofSetLineWidth(5);

    ofPolyline circle;
    circle.arc(pos, rad, rad, 0, 360, 360);
    circle.close();
    circle.draw();

If I increase the stroke width and give it some transparency you can see it’s sort of flipping over itself or rendering in 2 pieces:

What’s causing this? How can I draw a simple circle with >1 stroke width with reasonable code complexity?

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles