Skip to main content
Module

x/canvas/mod.ts>ContourMeasure

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Latest
interface ContourMeasure
import { type ContourMeasure } from "https://deno.land/x/canvas@v1.4.1/mod.ts";

Methods

getPosTan(distance: number, output?: PosTan): PosTan

Returns the given position and tangent line for the distance on the given contour. The return value is 4 floats in this order: posX, posY, vecX, vecY.

getSegment(
startD: number,
stopD: number,
startWithMoveTo: boolean,
): Path

Returns an Path representing the segement of this contour.

isClosed(): boolean

Returns true if the contour is closed.

length(): number

Returns the length of this contour.