GameMaker: Studio has a whole collection of functions available for drawing different forms and shapes. These functions should only ever be used in the draw event of an instance (you
can use them elsewhere but you won't see anything!) and create purely graphic effects, which means that they do not generate collision events as those can only be done through the
sprite or collision mask that has been assigned to an instance. All these functions are affected by the current draw colour, alpha and blend mode (see
colour And Blending).
The following drawing functions exist that can be used to draw basic shapes:
- draw_arrow
- draw_circle
- draw_circle_colour
- draw_ellipse
- draw_ellipse_colour
- draw_line
- draw_line_colour
- draw_line_width
- draw_line_width_colour
- draw_point
- draw_point_colour
- draw_rectangle
- draw_rectangle_colour
- draw_roundrect
- draw_roundrect_colour
- draw_roundrect_ext
- draw_roundrect_colour_ext
- draw_triangle
- draw_triangle_colour
The following functions are also included in GameMaker: Studio to help better control what you draw on the screen: