We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm in 9th grade and we've started doing processing and I found it quite fun so I decided to make my own little things at home. I tried making faces but for some reason I type in a line of code to draw a line before any of the other shapes and it still goes behind all of the other shapes. Could anyone explain why this happens and how I could fix it please, thanks :)
Answers
in 2D:
it's about the order in that you draw things.
It's like on a real canvas: When you draw it, it's on the canvas. When you draw something over it, the latter is above (in front) the previous. So you draw each item on top of the other.
Example:
(they was also a thing that did some optimisation by drawing shapes and lines in groups so it might be this. There's a hint to turn it off iirc. But try the above first)
@neutronstar: re:
If this is simple 2D, then before = behind.
Imagine a similar question:
Because things you draw first may end up underneath things you draw later -- in the real world, and in simple Processing 2D!