| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import type { DisplayObject } from '../../display-objects';
- import type { IElement } from '../../dom';
- import type { CSSStyleValue } from '../cssom';
- import { CSSUnitValue } from '../cssom';
- export declare function parseDimension(unitRegExp: RegExp, string: string): CSSStyleValue | undefined;
- /**
- * <length>
- * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/length
- * length with only absolute unit, eg. 1px
- */
- export declare const parseLength: {
- (...args: any[]): any;
- cache: Map<any, any>;
- };
- /**
- * <percentage>
- * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/percentage
- */
- export declare const parserPercentage: {
- (...args: any[]): any;
- cache: Map<any, any>;
- };
- /**
- * length with absolute or relative unit,
- * eg. 1px, 0.7em, 50%, calc(100% - 200px);
- *
- * @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/length-percentage
- */
- export declare const parseLengthOrPercentage: (css: string) => CSSUnitValue;
- export declare const parseAngle: {
- (...args: any[]): any;
- cache: Map<any, any>;
- };
- /**
- * merge CSSUnitValue
- *
- * @example
- * 10px + 20px = 30px
- * 10deg + 10rad
- * 10% + 20% = 30%
- */
- export declare function mergeDimensions(left: CSSUnitValue, right: CSSUnitValue, target: IElement, nonNegative?: boolean, index?: number): [number, number, (value: number) => string];
- export declare function convertAngleUnit(value: CSSUnitValue): number;
- export declare function parseDimensionArrayFormat(string: string | number | (string | number)[], size: number): number[];
- export declare function parseDimensionArray(string: string | (string | number)[]): CSSUnitValue[];
- export declare function convertPercentUnit(valueWithUnit: CSSUnitValue, vec3Index: number, target: DisplayObject): number;
- //# sourceMappingURL=dimension.d.ts.map
|