Loading...
Logo
Processing Forum

Semicircle create and fill

in General Discussion  •  Other  •  9 months ago  
I'm a processing newbie. How would I create and fill a semicircle? I'm trying to create a circle, with one half filled with one color and the second half filled with another. I have no problem generating and filling predefined Processing shapes, such as rectangles and ellipses, but this has me stumped. Thanks.

Replies(3)


look at arc please

you could use two arcs

Greetings, Chrisir   


Chrisir,

Works! Thanks very, very much. I'll be posting another question regarding fill. How do I fill a closed area which I've formed myself. I.e., not filling a predefined Processing shape, such as rect, ellipse, or a chorded arc?

hello,

nice to hear that it works.

Afaik there's not a single command for this fill-area.

You could paint a rect in the color you wish and after that paint your stuff (on top of it). But that is of course clumsy at the outside of the stuff...

Or use this:

https://forum.processing.org/topic/fill-tool-and-spray-tool-in-a-drawing-program#25080000001389423


Greetings, Chrisir     

P.S.
for a normal rect you use fill() of course, but you don't mean that.

P.S.
Or use beginShape()