draw_rectangle - draw a rectangle in the current drawing color
- x1 - x-position of top, left corner of rectangle
- y1 - y-position of top, left corner of rectangle
- x2 - x-position of bottom, right corner of rectangle
- y2 - y-position of bottom, right corner of rectangle
- outline - draw an outline, as true or false
draw_rectangle() will draw a rectangle in the current drawing color. The top left corner of the rectangle is determined by x1 and y1 The bottom left corner is determined by x2 and y2. If you wish for an outline to be drawn, set outline to true, otherwise, use false.
Example of Use
The code in this example draw a 100,100 square in the current drawing color at the top, left part of the room.
draw_rectangle() can be used to draw the background of a HUD.
This will draw a 320x32 rectangle in the current drawing color (usually black) which can be used as the background for a HUD.
- Not placing the function in the draw event.
- If the instance is not set as visible, the rectangle will not be drawn.