UNPKG

765 BTypeScriptView Raw
1import Path, { PathProps } from '../Path';
2export declare class BezierCurveShape {
3 x1: number;
4 y1: number;
5 x2: number;
6 y2: number;
7 cpx1: number;
8 cpy1: number;
9 cpx2?: number;
10 cpy2?: number;
11 percent: number;
12}
13export interface BezierCurveProps extends PathProps {
14 shape?: Partial<BezierCurveShape>;
15}
16declare class BezierCurve extends Path<BezierCurveProps> {
17 shape: BezierCurveShape;
18 constructor(opts?: BezierCurveProps);
19 getDefaultStyle(): {
20 stroke: string;
21 fill: string;
22 };
23 getDefaultShape(): BezierCurveShape;
24 buildPath(ctx: CanvasRenderingContext2D, shape: BezierCurveShape): void;
25 pointAt(t: number): number[];
26 tangentAt(t: number): number[];
27}
28export default BezierCurve;