Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sdl2/mod.ts>Canvas#drawLine

SDL2 module for Deno
Latest
method Canvas.prototype.drawLine
import { Canvas } from "https://deno.land/x/sdl2@0.9.0/mod.ts";

Draw a line on the current rendering target.

Parameters

x1: number

the x coordinate of the start point

y1: number

the y coordinate of the start point

x2: number

the x coordinate of the end point

y2: number

the y coordinate of the end point