Help using ofCairoRenderer

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


 ofCairoRenderer flightAngle;

under the draw section:

flightAngle.drawCircle(1024 / 2, 300,0, 150);
flightAngle.setFillMode(OF_OUTLINE);    //OF_FILLED is the other option
flightAngle.drawCircle(1024 / 2, 300,0, 150);

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?