绘制基本窗体


GameMaker Studio 2 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 the section on Colour).

IMPORTANT! Lines, points and forms are always drawn at 1:1 with the screen resolution, regardless of the event they are drawn in.



The following functions are also included in GameMaker Studio 2 to set drawing precision and draw some very specific things: