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?
Jordi
March 22, 2014, 2:52pm
#2
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
manish
March 22, 2014, 4:06pm
#3
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.
zach
March 22, 2014, 5:36pm
#4
just a quick note that this is a similar conversation:
I am trying to create a cartoony cloudlike bubble shape, consisting of many overlapping circles, currently being drawn with calls to ofCircle(). I would like the entire resulting shape to be semi-transparent. Is there a way to do this so that the entire shape has the same transparency level (i.e. so you can’t make out all the individual overlapping circles), as in the following example:
[image]
Is there some GL blending function that can accomplish this?
Or maybe some way to “draw” into a tex…