moveto.d.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { Line } from '../line';
  2. import { Curve } from '../curve';
  3. import { Point } from '../point';
  4. import { Segment } from './segment';
  5. export declare class MoveTo extends Segment {
  6. constructor(line: Line);
  7. constructor(curve: Curve);
  8. constructor(x: number, y: number);
  9. constructor(p: Point.PointLike | Point.PointData);
  10. get start(): Point;
  11. get type(): string;
  12. bbox(): null;
  13. closestPoint(): Point;
  14. closestPointLength(): number;
  15. closestPointNormalizedLength(): number;
  16. closestPointT(): number;
  17. closestPointTangent(): null;
  18. length(): number;
  19. lengthAtT(): number;
  20. divideAt(): [Segment, Segment];
  21. divideAtLength(): [Segment, Segment];
  22. getSubdivisions(): never[];
  23. pointAt(): Point;
  24. pointAtLength(): Point;
  25. pointAtT(): Point;
  26. tangentAt(): null;
  27. tangentAtLength(): null;
  28. tangentAtT(): null;
  29. isDifferentiable(): boolean;
  30. scale(sx: number, sy: number, origin?: Point.PointLike | Point.PointData): this;
  31. rotate(angle: number, origin?: Point.PointLike | Point.PointData): this;
  32. translate(tx: number, ty: number): this;
  33. translate(p: Point.PointLike | Point.PointData): this;
  34. clone(): MoveTo;
  35. equals(s: Segment): boolean;
  36. toJSON(): {
  37. type: string;
  38. end: {
  39. x: number;
  40. y: number;
  41. };
  42. };
  43. serialize(): string;
  44. }
  45. export declare namespace MoveTo {
  46. function create(line: Line): MoveTo;
  47. function create(curve: Curve): MoveTo;
  48. function create(point: Point.PointLike): MoveTo;
  49. function create(x: number, y: number): MoveTo;
  50. function create(point: Point.PointLike, ...points: Point.PointLike[]): Segment[];
  51. function create(x: number, y: number, ...coords: number[]): Segment[];
  52. }