Coming from Processing - Stroke

What is the command to set the stroke of an object in openFrameworks? Like in Processing:


Thanks for your help!

I’m not sure that something like that exists in OF.

However, this will work the same way:

ofSetColor(255, 255, 255); //fill color  
ofRect(x, y, width, height);  
ofSetColor(255, 0, 0);//stroke color  
ofRect(x, y, width, height);  

Hope that helps.

you can use glLineWidth(int width) (or maybe its a float can’t remember) but this will have weird results if you’re doing anything but a rectangular shape because of the way it handles joints.

There’s also ofSetLineWidth(float lineWidth) which probably does the same thing.