Progetto H — API Reference API & Scripting Documentation
Function Client Moderate

Canvas:DrawTexture

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

Syntax

Lua
my_canvas:DrawTexture(texture_path, screen_position, screen_size, coordinate_position, coordinate_size = Vector2D(1, 1), render_color = Color.WHITE, blend_mode = BlendMode.AlphaBlend, rotation = 0, pivot_point = Vector2D(0.5, 0.5))

Parameters

Name Type Default Description
texture_path ImagePath
screen_position Vector2D
screen_size Vector2D
coordinate_position Vector2D
coordinate_size optional Vector2D Vector2D(1, 1)
render_color optional Color Color.WHITE
blend_mode optional BlendMode BlendMode.AlphaBlend AlphaBlend is recommended for textures with transparency. Otherwise you may use Opaque.
rotation optional float 0
pivot_point optional Vector2D Vector2D(0.5, 0.5)