Uploaded by LENORA EARLS

Drawing Shapes

advertisement
Drawing Shapes
There are lots of different options for drawing in Game Lab. You've already seen three blocks: rect , ellipse , and fill . They will let you make circles
and squares of different colors.
Rect
The rect block will plot a square at the x and y coordinates it is given. The x and y coordinates tell it where the top left corner of the square goes in the
display area.
Ellipse
The ellipse block will plot a circle at the x and y coordinates it is given. The x and y coordinates tell it where the center of the circle goes in the display
area.
Coordinates in Game Lab
In order to plot things on the screen in Game Lab, you will need to use x and y coordinates. The x coordinate tells how far something is from the left side of
the display area. The y coordinate tells how far something is from the top of the display area.
Fill
The fill block changes the color that Game Lab uses to color in the shapes you draw. Once you use the fill block, all the new shapes you draw will be
filled in with that color, until you use the fill block to change the color again.
Colors in Game Lab
Game Lab understands most common color names, such as "red", "green", and "brown". It also understands all the HTML Color names listed at HTML
Color Names - W3Schools.
Found a bug in the documentation? Let us know at documentation@code.org
If you are interested in licensing Code.org materials for commercial purposes, contact us.
Download