import { IShapeBounding } from '../types'; import { Modifier } from './Modifier'; /** * @category Modifiers.Enums */ export declare enum EAdaptMode { /** * The buffer is not changed * @order 1 */ None = 0, /** * The buffer is scaled in a range between [-1, -1] and [1,1] * @order 2 */ Scale = 2, /** * The buffer is scaled in a range between [-1, -1] and [1,1] and is centered * @order 3 */ Center = 4, /** * The buffer is adapted centrally and expanded in a range between [-1, -1] and [1,1] * @order 4 */ Fill = 8 } /** * @internal * @ignore */ export declare const Bounding: { empty: () => IShapeBounding; clear: (tmpBounding: Array) => void; add: (tmpBounding: Array, x: number, y: number) => void; sum: (dest: Array, bounding: Array) => void; bind: (bounding: IShapeBounding, tmpBounding: Array) => void; }; /** * * @category Modifiers.Settings * @interface IAdaptSettings */ export interface IAdaptSettings { mode?: EAdaptMode; rect: IShapeBounding; } /** * Fit a buffer into a rectangle based on EAdaptMode * * @category Modifiers * @class Adapt * @extends {Modifier} */ declare class Adapt extends Modifier { static MODES: typeof EAdaptMode; private rect; private mode; constructor(args: IAdaptSettings); apply(buffer: Float32Array, bClosed: boolean): Float32Array; /** * Return adapted buffer between [-1,-1] and [1,1] * * @public * @static * @param {Float32Array} input * @param {EAdaptMode} mode * @returns {Float32Array} * @memberof ShapeBuffer */ static adapt(input: Float32Array | Array, mode: EAdaptMode, rect?: IShapeBounding): Float32Array; /** * Get buffer bounding * * @static * @param {Float32Array | Array} buffer * @returns {IShapeBounding} * @memberof ShapePrimitive */ static getBounding(buffer: Float32Array | Array, bounding?: IShapeBounding): IShapeBounding; } export { Adapt }; //# sourceMappingURL=Adapt.d.ts.map