declare let requestAnimFrame: any, cancelAnimFrame: any;
export { requestAnimFrame, cancelAnimFrame };
export declare function isSVG(url: string): 0 | 1 | 2;
/**
* Load a image, can be a remote one or a local file.
* If in node, a SVG image will be converted to a png file by [svg2img]{@link https://github.com/FuZhenn/node-svg2img}
* @param img - the image object to load.
* @param imgDesc - image's descriptor, it's an array. imgUrl[0] is the url string, imgUrl[1] is the width, imgUrl[2] is the height.
* @private
* @memberOf Util
*/
export declare function loadImage(img: any, imgDesc: Object[]): void;
export declare function UID(): number;
export declare const GUID: typeof UID;
/**
* Parse a JSON string to a object
* @param str - a JSON string
* @return
* @memberOf Util
*/
export declare function parseJSON(str: string): any;
export declare function pushIn>(...args: T[]): number;
export declare function mergeArray>(...args: T[]): any[];
export declare function removeFromArray(obj: T, array: T[]): void;
export declare function forEachCoord(arr: any[], fn: Function, context?: any): any;
export declare function getValueOrDefault(v: T, d: T): T;
/**
* Polyfill for Math.sign
* @param x
* @return
* @memberOf Util
*/
export declare function sign(x: number): number;
export declare function log2(x: number): number;
/**
* Interpolate between two number.
*
* @param from
* @param to
* @param t interpolation factor between 0 and 1
* @returns interpolated color
*/
export declare function interpolate(a: number, b: number, t: number): number;
/**
* constrain n to the given range, via modular arithmetic
* @param n value
* @param min the minimum value to be returned, inclusive
* @param max the maximum value to be returned, inclusive
* @returns constrained number
* @private
*/
export declare function wrap(n: number, min: number, max: number): number;
/**
* constrain n to the given range via min + max
*
* @param n value
* @param min the minimum value to be returned
* @param max the maximum value to be returned
* @returns the clamped value
* @private
*/
export declare function clamp(n: number, min: number, max: number): number;
/**
* Is object an array and not empty.
* @param obj
* @return true|false
* @private
* @memberOf Util
*/
export declare function isArrayHasData(obj: Object): boolean;
/**
* Whether the input string is a valid url.
* form: https://github.com/axios/axios/blob/master/lib/helpers/isAbsoluteURL.js
* @param url - url to check
* @return
* @memberOf Util
* @private
*/
export declare function isURL(url: string): boolean;
export declare function isCssUrl(str: string): 0 | 1 | 2 | 3;
export declare function extractCssUrl(str: string): any;
/**
* btoa or a polyfill in old browsers.
* Creates a base-64 encoded ASCII string from a String object in which each character in the string is treated as a byte of binary data.
* From https://github.com/davidchambers/Base64.js
* @param input - input string to convert
* @return ascii
* @memberOf Util
* @example
* const encodedData = Util.btoa(stringToEncode);
*/
export declare function btoa(input: string): string;
export declare function b64toBlob(b64Data: string, contentType: string): Blob;
/**
* Compute degree bewteen 2 points.
* @param x0
* @param y0
* @param x1
* @param y1
* @return degree between 2 points
* @memberOf Util
*/
export declare function computeDegree(x0: number, y0: number, x1: number, y1: number): number;
/**
* Transparent 1X1 gif image
* from https://css-tricks.com/snippets/html/base64-encode-of-1x1px-transparent-gif/
* @memberOf Util
*/
export declare const emptyImageUrl = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
/**
* shallow equal
* @param obj1
* @param obj2
* @return
* @private
* @memberOf Util
*/
export declare function equalMapView(obj1: Object, obj2: Object): boolean;
/**
* Flash something, show and hide by certain internal for times of count.
*
* @param interval - interval of flash, in millisecond (ms)
* @param count - flash times
* @param cb - callback function when flash ended
* @param context - callback context
* @return this
* @private
* @memberOf Util
*/
export declare function flash(interval?: number, count?: number, cb?: Function, context?: any): any;
export declare function _defaults(obj: any, defaults: any): any;
export declare function getPointsResultPts(points?: any[], ptKey?: string): any[];
export declare function getImageBitMap(data: {
data: T;
}, cb: (d: T) => void | any): void;
export declare function getAbsoluteURL(url: string): string;
export declare function calCanvasSize(size: {
width: number;
height: number;
}, devicePixelRatio?: number): {
cssWidth: string;
cssHeight: string;
width: number;
height: number;
};
export declare function isNoContentHttpCode(code: number): boolean;
//# sourceMappingURL=util.d.ts.map