Drawing

This section has all the different functions that are for drawing things with GameMaker: Studio.

When an object has a sprite assigned to it, it will draw that sprite without any need to add anything into the draw event. But there are many, many occasions when you will need to add other things into the draw event of an object and this section has all the functions that are available for the different things that you can draw, from simple circles and rectangles, through sprites and text, and on through 2D primitives, surfaces and 3D:

  1. Colour And Blending
  2. Drawing Basic Forms
  3. Drawing Sprites And Backgrounds
  4. Drawing Text
  5. Drawing Primitives
  6. Drawing 3D
  7. Drawing Surfaces

There are also a few special functions relating to the way that GameMaker: Studio draws the textures that it uses. Please realise that a sprite is actually a textured quad (a four point primitive made of two triangles) and as such some of the following functions will also affect how they are drawn:

  1. texture_get_width
  2. texture_get_height
  3. texture_get_texel_width
  4. texture_get_texel_height
  5. texture_set_interpolation
  6. texture_set_interpolation_ext
  7. texture_set_blending
  8. texture_set_repeat
  9. texture_set_repeat_ext
  10. texture_set_stage

Finally, there are two extra draw functions for advanced users to better control how things are drawn:

  1. draw_texture_flush
  2. draw_enable_drawevent


Back: Reference
© Copyright YoYo Games Ltd. 2015 All Rights Reserved