Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Seg

import { Seg } from "https://raw.githubusercontent.com/ycw/svg-path/main/src/mod.ts";
abstract

Path segment.

abstract class Seg {
abstract cmd: CmdTy;
 
abstract clone(): Seg;
isA(): this is SegA;
abstract isAbs(): boolean;
isC(): this is SegC;
abstract isCmdEq(seg: Seg): boolean;
isH(): this is SegH;
isL(): this is SegL;
isM(): this is SegM;
isQ(): this is SegQ;
abstract isRel(): boolean;
isS(): this is SegS;
isT(): this is SegT;
isV(): this is SegV;
isZ(): this is SegZ;
abstract toAbs(x: number, y: number): void;
abstract toRel(x: number, y: number): void;
}

§Properties

§
cmd: CmdTy
[src]

Command letter.

§Methods

§
clone(): Seg abstract
[src]

Make a copy.

§
isA(): this is SegA
[src]
§
isAbs(): boolean abstract
[src]

Check if the command is absolute.

§
isC(): this is SegC
[src]
§
isCmdEq(seg: Seg): boolean abstract
[src]

Check if given segment has exact same command letter of this segment.

@param seg

Another Seg.

§
isH(): this is SegH
[src]
§
isL(): this is SegL
[src]
§
isM(): this is SegM
[src]
§
isQ(): this is SegQ
[src]
§
isRel(): boolean abstract
[src]

Check if the command is relative.

§
isS(): this is SegS
[src]
§
isT(): this is SegT
[src]
§
isV(): this is SegV
[src]
§
isZ(): this is SegZ
[src]
§
toAbs(x: number, y: number): void abstract
[src]

Convert to absolute command.

@param x

Reference global x

@param y

Reference global y

§
toRel(x: number, y: number): void abstract
[src]

Convert to relative command.

@param x

Reference global x

@param y

Reference global y