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

x/skia_canvas/mod.ts>Path2D

Fast HTML Canvas API implementation for Deno using Google Skia
Latest
class Path2D
Re-export
import { Path2D } from "https://deno.land/x/skia_canvas@0.5.8/mod.ts";

Constructors

new
Path2D()
new
Path2D(path: Path2D)
new
Path2D(svg: string)
new
Path2D(path?: Path2D | string)

Properties

readonly
_unsafePointer: Deno.PointerValue

Methods

addPath(path: Path2D, transform?: DOMMatrix)
arc(
x: number,
y: number,
radius: number,
startAngle: number,
endAngle: number,
anticlockwise: boolean,
)
arcTo(
x1: number,
y1: number,
x2: number,
y2: number,
radius: number,
)
asWinding(): boolean
bezierCurveTo(
cp1x: number,
cp1y: number,
cp2x: number,
cp2y: number,
x: number,
y: number,
)
difference(path: Path2D): number
ellipse(
x: number,
y: number,
radiusX: number,
radiusY: number,
rotation: number,
startAngle: number,
endAngle: number,
anticlockwise: boolean,
)
intersect(path: Path2D): number
isPointInPath(
x: number,
y: number,
fillRule?: FillRule,
): boolean
isPointInStroke(
x: number,
y: number,
lineWidth: number,
): boolean
lineTo(x: number, y: number)
moveTo(x: number, y: number)
quadraticCurveTo(
cpx: number,
cpy: number,
x: number,
y: number,
)
rect(
x: number,
y: number,
width: number,
height: number,
)
reverseDifference(path: Path2D): number
roundRect(
x: number,
y: number,
width: number,
height: number,
)
simplify(): boolean
toSVGString(): string
union(path: Path2D): number
xor(path: Path2D): number