what's the difference?

I know this is a basic question, but i’m stuck… i’m not sure what’s the use of the different notation? i’m coming over from processing. i started with vectorGraphcExamples and started making a mess from there.

//draw the circle  
output.circle(a, b, dia);  
ofCircle(a, b, dia);  


okay, answering my own question - sort of… the “output.circle” does the same thing by calling into the ofxVectorGraphics method - but what is bDraw, bRecord and bFill have to do with it all?

-bFill – easier access to drawing an outline or a filled circle?

Thanks for any insight.

missed this in the .h file, gives me a bit of hint

ofxVectorGraphics output;  

void ofxVectorGraphics::circle(float x1,float y1, float radius){  
		ofCircle(x1, y1, radius);  
		if(bFill) creeps.disk(x1, y1, radius);   
		else creeps.circle(x1, y1, radius);  

Welcome to OF!

The ofxVectorGraphics addon lets you draw shapes to the screen and then also save the shapes to an EPS (vector graphics) file. It is like a screen capture but for vector graphics as opposed to pixels.

If you just need to draw to the screen and don’t care about eps output then you should look at the graphicsExample and polygonExample in the examples folder as that is the main way we draw shapes in OF.

What ofxVectorGraphics class does is it tries to mimic all the openFrameworks graphics functions so that what is normally circle(10, 10, 15); is myVectorGraphicsObject.circle(10, 10, 15);

Most of the time you just want to draw the graphics and then capture just one frame, so each drawing function like ofxVectorGraphics ::circle(float x, float y, float radius) has the code for the drawing and also the code for saving the same shape into an eps file. That is what all this stuff is for:

      if(bFill) creeps.disk(x1, y1, radius);   
      else creeps.circle(x1, y1, radius);   

Anyway most likely you are just interested in the regular graphics functions which just draw.
There is a list of those functions here: http://www.openframeworks.cc/documentat-…-ics-ofRect

And they can be found in the graphicsExample and polygonExample in the examples/ folder

Also seeing as you are coming from Processing - check the guide Zach Gage put together.


Thanks a bunch Theo,

makes perfect sense. i’ve read through the processing guide, and keep referring to it. also, as a refresher i’m working through the OOP guide. (anyone reading this, that is in my boat, type it in your self, don’t copy paste- you’ll learn more)

i’ll work on breaking the other example files next - Thanks…