BezierCurve.d.ts 765 B

12345678910111213141516171819202122232425262728
  1. import Path, { PathProps } from '../Path';
  2. export 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. }
  13. export interface BezierCurveProps extends PathProps {
  14. shape?: Partial<BezierCurveShape>;
  15. }
  16. declare 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. }
  28. export default BezierCurve;