Skip to content

canvas.um

Marek Maskarinec edited this page Sep 14, 2022 · 1 revision

canvas.um

 Canvas library allowing for drawing basic shapes. Coordinates are based on
 the screen.

fn drawText*

fn drawText*(text: str, pos: th.Vf2, color: uint32, size: th.fu)

Draws a basic pixel text. Only ascii is supported.

fn textSize*

fn textSize*(text: str, scale: th.fu): th.Vf2 {

Returns the size of text taken by an equivalent drawText call.

fn drawRect*

fn drawRect*(color: uint32, r: rect.Rect)

Draws a Rectangle.

fn drawLine*

fn drawLine*(color: uint32, b, e: th.Vf2, thickness: th.fu)

Draws a line.

Clone this wiki locally