How to erase certain area of a shape?

Hi, I’m a newbie OF programmer.

I would like to know if I can for example draw a circle and then, draw smaller circle inside of it.

and I want to erase the smaller circle’s shape so I can make a donut-like shape as a result.

Is there anything that can erase certain area of a shape?

For example,

ofSetColor(255, 0, 0);
ofCircle( 100, 100, 50);

ofEraseBelow();
ofCircle(100,100, 30);

And the result becomes a donut shape object.
Any suggestion?

One solution I can think of is playing around with blend modes:
ofEnableBlendMode()
setBlendMode()
But maybe there is a better solution to that… try and let us know how it goes

A hacky way would be to draw another circle on the top of the bigger circle with the background color ,but it wouldn’t delete anything ->

ofBackground(1,25,250);

ofSetColor(255,0,0);
ofCircle(100,100,50);

ofSetColor(1,25,250);
ofCircle(100,100,30);

Hope this helps!
Cheers.

just a quick note that this is a similar conversation: