Help using ofCairoRenderer

ignoring all the pre-written stuff I have added these few lines of code to my project:

ofApp.h:

 ofCairoRenderer flightAngle;

ofApp.cpp:
under the draw section:

ofFill();
flightAngle.setCircleResolution(50);
flightAngle.drawCircle(1024 / 2, 300,0, 150);
flightAngle.setFillMode(OF_OUTLINE);    //OF_FILLED is the other option
flightAngle.setLineWidth(3);
flightAngle.drawCircle(1024 / 2, 300,0, 150);
flightAngle.drawLine(1024/2-150,1024/2+150,300,300,0,0);

But every time I run it I get this error

Can anyone please explain what is going on? I feel like what I am trying to do should be really simple…

to use a cairo renderer you need to set it up first using one of the setup methods. the easiest way to use it is to use ofBeginSaveScreenAsPDF/ofEndSaveScreenAsPDF or ofBeginSaveScreenAsSVG/ofEndSaveScreenAsSVG and then use the usual OF draw functions

1 Like

Alright, Thank you. I guess it just does not do quite what I thought. I will just use another method.

what were you trying to do?