Draw_rectangle_angle - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
This function is part of the function set Drawing shapes
Notation
Description
Draws a rectangle from point x1,y1 to point x2,y2 using brush color/alpha and the given rotation. Outline indicates whether to only outline the rectangle (true) or to fill it (false).
Parameters
- x1,y1: The top-left coordinates of the rectangle in the room.
- x2,y2: The bottom-right coordinates.
- angle: angle in degrees of rotation
- outline: Whether to draw only the outline (true), or to fill in the whole rectangle (false).
Return Values
none: This function has no return values.
Example Call
// Draws a green rectangle with a red outline
draw_set_color(c_green)
draw_rectangle_angle(20, 20, 120, 120, 45, false) //Draws the body of the rectangle at 45 degrees
draw_set_color(c_red)
draw_rectangle_angle(20, 20, 120, 120, 45, true) //Draws the outline of the rectangle over the body at 45 degrees
See Also
NOTOC