import { ICubicBezierControl } from "../Interface/ICubicBezierControl"; import { IPoint2D } from "../Interface/IPoint2D"; import { IRect } from "../Interface/IRect"; import { CubicBezierControl } from "./CubicBezierControl"; import { Point2D } from "./Point2D"; /** * Map of cubic bezier controls to numbered indexes. */ export declare class CubicBezierIndex implements Record { [index: number]: CubicBezierControl; /** * @param controls Builds a new record from JSON Record * @returns CubicBezierRecord */ static buildFromJSON(controls: Record | Record): CubicBezierIndex; /** * Controls will be copied by reference into this record if provided in constructor. * @param controls Cubic bezier controls mapped to indexes */ constructor(controls?: Record); /** * Create a copy of this record and return it. * @returns CubicBezierRecord */ copy(): CubicBezierIndex; /** * Create a new record with scaled controls. * @param scalePoint Function which takes a point and returns the new scaled point. */ scale(scalePoint: (p: IPoint2D) => Point2D): CubicBezierIndex; /** * Create a new record with moved controls. * @param movePoint Function which takes a point and returns the new moved point. */ move(movePoint: (p: IPoint2D) => Point2D): CubicBezierIndex; /** * Create a new record with shifted controls. * @param dx Distance in x to shift control points. * @param dy Distance in y to shift control points. */ shift(dx: number, dy: number): CubicBezierIndex; boundToRect(rect: IRect): CubicBezierIndex; toJSON(): Record; forEach(fn: (control: CubicBezierControl, index: number) => void): void; }