nanos world API Reference Unofficial documentation
Function Client Moderate

Canvas:DrawRect

Draws a fille Rect on the Canvas<br/></br>This method can only be called from inside <code>Update</code> event

Syntax

Lua
my_canvas:DrawRect(texture_path, screen_position, screen_size, render_color = Color.WHITE, blend_mode = BlendMode.Opaque)

Parameters

Name Type Default Description
texture_path ImagePath Pass empty to use default white Texture
screen_position Vector2D
screen_size Vector2D
render_color optional Color Color.WHITE
blend_mode optional BlendMode BlendMode.Opaque