Skip to content

types.line_drawable ​

A drawable 2D line

Functions ​

new(): types.line_drawable ​

Creates a new line drawable

point(x : number, y : number, opt_color : types.color): types.line_drawable ​

Adds a point to the line

  • x (number) The x position
  • y (number) The y position
  • opt_color (types.color) (optional) The color for this point

color(color : types.color): types.line_drawable ​

Sets the default color for new points

layer(layer : number): types.line_drawable ​

Sets the draw layer; blur includes UI from lower layers

  • layer (number) A non-negative layer (default 0)
  • returns (types.line_drawable) The drawable instance

insert(canvas : types.ui_canvas) ​

Inserts the drawable into a UI canvas