skia-path2d
Version:
Extract the core code related to Path2D, PathStrore, and isPointInPath from Skia and rewrite it with typescript
21 lines (20 loc) • 640 B
TypeScript
import { PathBuilder } from './path_builder';
import { Point } from './point';
import { PathIterVerb } from './path_types';
export declare class PathIter {
path: PathBuilder;
forceClose: boolean;
needClose: boolean;
closeLine: boolean;
verbIndex: number;
verbEnd: number;
lastPoint: Point;
movePoint: Point;
pointIndex: number;
constructor(path: PathBuilder, forceClose?: boolean);
get verbs(): any;
setPath(path: PathBuilder, forceClose?: boolean): void;
isClosedContour(): boolean;
autoClose(pts: Point[]): PathIterVerb.kLineTo | PathIterVerb.kClose;
next(pts: Point[]): any;
}