graphics.drawRectangle

From GTA Connected
Revision as of 10:45, 28 November 2020 by Mex (talk | contribs)
Jump to navigation Jump to search

Function Client Only icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Client 1.0.0

void graphics.drawRectangle(Surface surface, Vec2 position, Vec2 size, [ int colour1 = COLOUR_WHITE ], [ int colour2 = COLOUR_WHITE ], [ int colour3 = COLOUR_WHITE ], [ int colour4 = COLOUR_WHITE ], [ float rotation = 0.0 ], [ Vec2 center = Vec2(0.0,0.0) ], [ Vec2 sourcePos = Vec2(0.0,0.0) ], [ Vec2 sourceSize = Vec2(1.0,1.0) ], [ Vec2 scale = Vec2(1.0,1.0) ])

The graphics.drawRectangle function is used to draw a rectangle in 2D space.

Parameters

1) Surface surface The surface object, which can be null.
2) Vec3 position The 2D position for the rectangle.
3) Vec3 size The 2D size for the rectangle.
4) int colour1 Optional, defaults to COLOUR_WHITE. The 1st colour for the rectangle.
5) int colour2 Optional, defaults to COLOUR_WHITE. The 2nd colour for the rectangle.
6) int colour3 Optional, defaults to COLOUR_WHITE. The 3rd colour for the rectangle.
7) int colour4 Optional, defaults to COLOUR_WHITE. The 4th colour for the rectangle.
8) float rotation Optional, defaults to 0.0. The rotation of the rectangle.
9) Vec2 center Optional, defaults to Vec2(0.0,0.0). The center of the rectangle.
10) Vec2 sourcePos Optional, defaults to Vec2(0.0,0.0). The source position of the rectangle.
11) Vec2 sourceSize Optional, defaults to Vec2(1.0,1.0). The source size of the rectangle.
12) Vec2 scale Optional, defaults to Vec2(1.0,1.0). The scale of the rectangle.

Return

void This function doesn't return a value.

Notes

There aren't any notes for this function.

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.