Files
rough/bin/generator-base.d.ts
2018-07-13 20:12:29 -07:00

21 lines
939 B
TypeScript

import { RoughRenderer } from './renderer.js';
import { Config, DrawingSurface, Options, ResolvedOptions, Drawable, OpSet, PathInfo } from './core';
import { Point } from './geometry.js';
export declare abstract class RoughGeneratorBase {
protected config: Config;
protected surface: DrawingSurface;
protected renderer: RoughRenderer;
defaultOptions: ResolvedOptions;
constructor(config: Config | null, surface: DrawingSurface);
protected _options(options?: Options): ResolvedOptions;
protected _drawable(shape: string, sets: OpSet[], options: ResolvedOptions): Drawable;
protected readonly lib: RoughRenderer;
private getCanvasSize;
protected computePolygonSize(points: Point[]): Point;
protected polygonPath(points: Point[]): string;
protected computePathSize(d: string): Point;
toPaths(drawable: Drawable): PathInfo[];
private fillSketch;
opsToPath(drawing: OpSet): string;
}