gta.drawRectangle
Jump to navigation
Jump to search
gta.drawRectangle
Signature: void gta.drawRectangle(RenderTarget renderTarget, Vec2 position, Vec2 size, Vec2 centre, float rotation, int colour, Vec2 sourcePosition, Vec2 sourceSize)
Usage: draw a 2D rectangle in screen coordinates
Parameters
- RenderTarget renderTarget The render target object.
- Vec2 position The 2D rectangle position, in pixels.
- Vec2 size The 2D rectangle size, in pixels.
- Vec2 centre The 2D centre of the rectangle.
- float rotation The rotation of the rectangle.
- int colour The RGBA colour of the rectangle.
- Vec2 sourcePosition The 2D source position.
- Vec2 sourceSize The 2D source size.
Return
void
On failure: void