Draw Rectangle Icon Draw Rectangle

This action will draw a rectangle at a given position within the room. You give the top left position and the bottom right position and the rectangle will be drawn between them, and the position can either be an absolute position within the room, or a position relative to the instance calling the action. You can also set whether the rectangle can be filled or outlined by checking the fill box at the bottom.

NOTE This action is only for use in the various Draw Events, and will not draw anything if used elsewhere.

 

Action Syntax:

Draw Rectangle Action

Arguments:

ArgumentDescription
LeftThe left position to start drawing from
TopThe top position to start drawing from
RightThe right position to end drawing from
BottomThe bottom position to end drawing from

 

Example:

Draw Rectangle ExampleThe above action block code draws two rectangles, one green and filled, and one yellow and outline only, at a position relative to the instance calling the actions.