Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface SkPathConstructorAndFactory
import { type SkPathConstructorAndFactory } from "";

Contains the ways to create an SkPath.


MakeFromCmds(cmds: PathCommand[]): SkPath

Creates a new path from the given list of path commands.

verbs: VerbList,
weights?: WeightList,
): SkPath

Creates a new path using the provided verbs and associated points and weights. The process reads the first verb from verbs and then the appropriate number of points from the FlattenedPointArray (e.g. 2 points for moveTo, 4 points for quadTo, etc). If the verb is a conic, a weight will be read from the WeightList. If the data is malformed (e.g. not enough points), the resulting path will be incomplete.