/** * Enumeration of supported string encoded numerals. * @internal */ export declare enum StringEncodedNumeralType { Meters = 0, Pixels = 1, Hex = 2 } /** * Interface containing information about a [[StringEncodedNumeral]] format, component size and * evaluation. * @internal */ export interface StringEncodedNumeralFormat { readonly type: StringEncodedNumeralType; readonly size: number; readonly regExp: RegExp; mask?: number; decoder: (encodedValue: string, target: number[]) => boolean; } /** * Array of all supported [[StringEncodedNumeralFormat]]s describing sizes, lengths and distances. * @internal */ export declare const StringEncodedMetricFormats: StringEncodedNumeralFormat[]; /** * Array of all supported [[StringEncodedNumeralFormat]]s describing color data. * @internal */ export declare const StringEncodedColorFormats: StringEncodedNumeralFormat[]; /** * Array of supported [[StringEncodedNumeralFormat]]s (intended to be indexed with * [[StringEncodedNumeralType]] enum). * @internal */ export declare const StringEncodedNumeralFormats: StringEncodedNumeralFormat[]; /** * @internal */ export declare const StringEncodedNumeralFormatMaxSize: number; /** * Parse string encoded numeral values using all known [[StringEncodedNumeralFormats]]. * * @param numeral - The string representing numeric value. * @param pixelToMeters - The ratio used to convert from meters to pixels (default 1.0). * @returns Number parsed or __undefined__ if non of the numeral patterns matches the expression * provided in [[numeral]]. */ export declare function parseStringEncodedNumeral(numeral: string, pixelToMeters?: number): number | undefined; /** * Parse string encoded color value using all known [[StringEncodedColorFormats]]. * * @param color - The string encoded color expression (i.e. '#FFF', 'rgb(255, 0, 0)', etc.). * @returns The color parsed or __undefined__ if non of the known representations matches * the expression provided in [[color]]. */ export declare function parseStringEncodedColor(color: string): number | undefined; //# sourceMappingURL=StringEncodedNumeral.d.ts.map