# Drawing: Drawing primitives¶

This example shows how to use the Draw Commands Module. It is a good place to start for new programmers because they do not need to know how to define functions or classes before drawing images.

"""

This example shows the drawing primitives and how they are used.
It does not assume the programmer knows how to define functions or classes
yet.

API documentation for the draw commands can be found here:

A video explaining this example can be found here:
https://vimeo.com/167158158
"""

# Import the Arcade library. If this fails, then try following the instructions
# for how to install arcade:

# Open the window. Set the window title and dimensions (width and height)

# Set the background color to white
# For a list of named colors see
# Colors can also be specified in (red, green, blue) format and
# (red, green, blue, alpha) format.

# Start the render process. This must be done before any drawing commands.

# Draw a grid
# Draw vertical lines every 120 pixels
for x in range(0, 601, 120):

# Draw horizontal lines every 200 pixels
for y in range(0, 601, 200):

# Draw a point

# Draw a set of points
point_list = ((165, 495),
(165, 480),
(165, 465),
(195, 495),
(195, 480),
(195, 465))

# Draw a line

# Draw a set of lines
point_list = ((390, 450),
(450, 450),
(390, 480),
(450, 480),
(390, 510),
(450, 510)
)

# Draw a line strip
point_list = ((510, 450),
(570, 450),
(510, 480),
(570, 480),
(510, 510),
(570, 510)
)

# Draw a polygon
point_list = ((30, 240),
(45, 240),
(60, 255),
(60, 285),
(45, 300),
(30, 300))

# Draw a filled in polygon
point_list = ((150, 240),
(165, 240),
(180, 255),
(180, 285),
(165, 300),
(150, 300))

# Draw an outline of a circle

# Draw a filled in circle

# Draw an ellipse outline, and another one rotated

# Draw a filled ellipse, and another one rotated

# Draw an arc, and another one rotated

# Draw an rectangle outline

# Draw a filled in rectangle

# Load and draw an image to the screen
# Image from kenney.nl asset pack #1
scale = .6