In function draw(), I’m calling two functions. drawRect() and drawCircle(), I filled the rect with white and filled the circle with grey. But when I run my code, the circle is white and the rectangle is grey… what am I doing wrong?
My code looks like this:
rect(WIDTH/3, HEIGHT/3, 200,80)
The fill should be before the rect or ellipse. The color gets set first, then the object gets drawn.
PS. When you post code, put ~~~ ( 3 tildes) before the code and again after the code. I added them to the above code.
Just a suggestion. Look thru the reference just to get an idea of the commands and what’s available. That might help with future code, but we’re here to answer questions too.
codea things, like draw … and everything … happen in the order encountered. it’s generally not like CSS where a chunk of stuff just all adds up to do the right thing.
please tell us a bit about your experience, it’ll help us pitch things at the right level.
keep on, it’s fun!