Progetto H — Riferimento API Documentazione & Scripting
Costruttore Condiviso

Canvas.Default Constructor

Sintassi

Lua
Canvas(is_visible = true, clear_color = Color.TRANSPARENT, auto_repaint_rate = -1, should_clear_before_update = true, auto_resize = true, width = 0, height = 0, screen_position = Vector2D(0, 0))

Parametri

Nome Tipo Predefinito Descrizione
is_visible facoltativo boolean true Whether to draw it on screen
clear_color facoltativo Color Color.TRANSPARENT Color to clear with (background color)
auto_repaint_rate facoltativo float -1 Rate to auto repaint (call Update event), pass 0 for every frame, -1 to disable
should_clear_before_update facoltativo boolean true Whether to clear with Clear Color before updates
auto_resize facoltativo boolean true Auto resize with screen's size
width facoltativo integer 0 If not using auto_resize
height facoltativo integer 0 If not using auto_resize
screen_position facoltativo Vector2D Vector2D(0, 0) If not using auto_resize, offset when drawing to screen