graphics.drawRectangle

From GTA Connected
Revision as of 12:16, 14 December 2019 by Mex (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |type = function |name = graphics.drawRectangle |usage = draw a rectangle in 2D space |parameters = Vec2 position, Vec2 size, [ int colour1 = C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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(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) Vec3 position The 2D position for the rectangle.
2) Vec3 size The 2D size for the rectangle.
3) int colour1 Optional, defaults to COLOUR_WHITE. The 1st colour for the rectangle.
4) int colour2 Optional, defaults to COLOUR_WHITE. The 2nd colour for the rectangle.
5) int colour3 Optional, defaults to COLOUR_WHITE. The 3rd colour for the rectangle.
6) int colour4 Optional, defaults to COLOUR_WHITE. The 4th colour for the rectangle.
7) float rotation Optional, defaults to 0.0. The rotation of the rectangle.
8) Vec2 center Optional, defaults to Vec2(0.0,0.0). The center of the rectangle.
9) Vec2 sourcePos Optional, defaults to Vec2(0.0,0.0). The source position of the rectangle.
10) Vec2 sourceSize Optional, defaults to Vec2(1.0,1.0). The source size of the rectangle.
11) 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.