UNPKG

637 BTypeScriptView Raw
1import Path, { PathProps } from '../Path';
2import { VectorArray } from '../../core/vector';
3export declare class LineShape {
4 x1: number;
5 y1: number;
6 x2: number;
7 y2: number;
8 percent: number;
9}
10export interface LineProps extends PathProps {
11 shape?: Partial<LineShape>;
12}
13declare class Line extends Path<LineProps> {
14 shape: LineShape;
15 constructor(opts?: LineProps);
16 getDefaultStyle(): {
17 stroke: string;
18 fill: string;
19 };
20 getDefaultShape(): LineShape;
21 buildPath(ctx: CanvasRenderingContext2D, shape: LineShape): void;
22 pointAt(p: number): VectorArray;
23}
24export default Line;