Strange cut outs when drawing a simple circle

Hello,

I’m drawing a simple circle using this piece of code:

  
  
ofSetColor(255);  
ofSetLineWidth(50.0f);  
ofSetCircleResolution(100);  
ofNoFill();  
ofCircle(ofGetWidth() / 2, ofGetHeight() / 2, 200.0f);  
  

It shows up like this:

Has anyone seen this before? If I reduce the line width to a lower number (1, 2) it seems to draw ok.

I’m running this code in the emptyExample on OS X 10.8.4 with openFrameworks 0.7.4.

Kind regards,
Harry Vermeulen

1 Like

This isnt something I am super familiar with, but i have seen similar discussions around on the forums. I think it just comes down to how opengl does 2D vector graphics. You might have more luck with a different renderer, either Cairo or ShivaVG, there are addons for them

https://github.com/bgstaal/ofxShivaVG
https://github.com/bgstaal/ofxCairo

Here are some threads i found searching for ‘smooth vector’

http://forum.openframeworks.cc/t/how-to-smooth-joints-when-calling-ofsetlinewidth/7278/0
http://forum.openframeworks.cc/t/ofxshivavg-smooth-2d-graphics-in-of/12574/0

Thank you for your reaction.

I’m not able to get the ofxShivaVG add-on to work. First it’s bugging me about GLFW.h not being present, which I’ve now downloaded, compiled and linked. However now it’s bugging me with this more errors in ofPath.


Nevermind! Downloaded the 0.7.4 branch at: https://github.com/bgstaal/ofxShivaVG/tree/0.7.4 which works like a charm!

any idea if ofxShivaVG is working wiht 0.8.1 or 0.8.0?
I am trying with 10.9 and Xcode 5 without any success.

There’s any other (GL and fast) addon or something to get smooth lines?