import { Canvas } from "https://deno.land/x/sdl2@0.7.0/mod.ts";
SDL2 canvas.
Constructors
new
Canvas(window: Deno.PointerValue, target: Deno.PointerValue)Methods
drawLines(points: [number, number][])
Draw a series of connected lines on the current rendering target.
drawRects(rects:
[
[])number,
number,
number,
number,
]Draw some number of rectangles on the current rendering target.
fillRect()
x: number,
y: number,
w: number,
h: number,
Fill a rectangle on the current rendering target with the drawing color.
fillRects(rects:
[
[])number,
number,
number,
number,
]Fill some number of rectangles on the current rendering target with the drawing color.
setDrawColor()
r: number,
g: number,
b: number,
a: number,
Set the color used for drawing operations (Rect, Line and Clear).