gta.drawRectangle

From GTA Connected
(Redirected from Gta.drawRectangle)
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 gta.drawRectangle(RenderTarget renderTarget, Vec2 position, Vec2 size, Vec2 centre, float rotation, int colour, Vec2 sourcePosition, Vec2 sourceSize)

The gta.drawRectangle function is used to draw a 2D rectangle in screen coordinates.

Parameters

1) RenderTarget renderTarget The render target object.
2) Vec2 position The 2D rectangle position, in pixels.
3) Vec2 size The 2D rectangle size, in pixels.
4) Vec2 centre The 2D centre of the rectangle.
5) float rotation The rotation of the rectangle.
6) int colour The RGBA colour of the rectangle.
7) Vec2 sourcePosition The 2D source position.
8) Vec2 sourceSize The 2D source size.

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

  • This function was previously named game.drawRectangle in client version 1.0.71.

Related

Client Related

icon-iii.png icon-vc.png icon-sa.png gta.drawRectangle