UNPKG

1.32 kBTypeScriptView Raw
1import { Axis } from './ViewPort';
2import { Document, Element, PathElement } from './Document';
3export declare class Property<T = unknown> {
4 private readonly document;
5 private readonly name;
6 private value;
7 static empty(document: Document): Property<string>;
8 static readonly textBaselineMapping: Record<string, string>;
9 private isNormalizedColor;
10 constructor(document: Document, name: string, value: T);
11 split(separator?: string): Property<string>[];
12 hasValue(zeroIsValue?: boolean): boolean;
13 isString(regexp?: RegExp): boolean;
14 isUrlDefinition(): boolean;
15 isPixels(): boolean;
16 setValue(value: T): this;
17 getValue(def?: T): T;
18 getNumber(def?: T): number;
19 getString(def?: T): string;
20 getColor(def?: T): string;
21 getDpi(): number;
22 getRem(): number;
23 getEm(): number;
24 getUnits(): string;
25 getPixels(axis?: Axis, processPercent?: boolean): number;
26 getPixels(isFontSize?: boolean): number;
27 getMilliseconds(): number;
28 getRadians(): number;
29 getDefinition<T extends Element>(): T;
30 getFillStyleDefinition(element: Element | PathElement, opacity: Property): string | CanvasGradient | CanvasPattern;
31 getTextBaseline(): string;
32 addOpacity(opacity: Property): Property<string>;
33}
34//# sourceMappingURL=Property.d.ts.map
\No newline at end of file