a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / Rectangle
Represents a rectangle that can be drawn on the screen.
new Rectangle(
pos
,size
,color
):Rectangle
Creates a new Rectangle instance.
• pos: Point
The position of the rectangle.
• size: Size
The size of the rectangle.
• color: Color
The color of the rectangle.
color:
Color
The color of the rectangle.
pos:
Point
The position of the rectangle.
size:
Size
The size of the rectangle.
Internal draw function that handles the logic for drawing the rectangle.
Either an offset size or a position point.
The size to draw the rectangle with.
The color to draw the rectangle with.
An optional size specifying the resolution.
draw(
offset
?,resolution
?):void
Draws the rectangle on the screen.
• offset?: Size
An optional size specifying an offset to use when drawing.
• resolution?: Size
An optional size specifying the resolution.
void
Either an offset size or a position point.
The size to draw the rectangle with.
The color to draw the rectangle with.
An optional size specifying the resolution.
draw(
pos
,size
,color
,resolution
?):void
Draws the rectangle on the screen with the specified position, size, and color.
• pos: Point
The position to draw the rectangle at.
• size: Size
The size to draw the rectangle with.
• color: Color
The color to draw the rectangle with.
• resolution?: Size
An optional size specifying the resolution.
void
Either an offset size or a position point.
The size to draw the rectangle with.
The color to draw the rectangle with.
An optional size specifying the resolution.
IDrawable.draw