-
Notifications
You must be signed in to change notification settings - Fork 5
canvas.um
Marek Maskarinec edited this page Sep 14, 2022
·
1 revision
Canvas library allowing for drawing basic shapes. Coordinates are based on
the screen.
fn drawText*(text: str, pos: th.Vf2, color: uint32, size: th.fu)
Draws a basic pixel text. Only ascii is supported.
fn textSize*(text: str, scale: th.fu): th.Vf2 {
Returns the size of text taken by an equivalent drawText call.
fn drawRect*(color: uint32, r: rect.Rect)
Draws a Rectangle.
fn drawLine*(color: uint32, b, e: th.Vf2, thickness: th.fu)
Draws a line.