nanos world API Reference Unofficial documentation
Function Client Moderate

Canvas:DrawPolygon

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

Syntax

Lua
my_canvas:DrawPolygon(texture_path, screen_position, radius = Vector2D(1, 1), number_of_sides = 3, 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
radius optional Vector2D Vector2D(1, 1)
number_of_sides optional integer 3
render_color optional Color Color.WHITE
blend_mode optional BlendMode BlendMode.Opaque