UNPKG

2.08 kBTypeScriptView Raw
1import { MatrixArray } from '../core/matrix';
2import Transformable, { TransformProp } from '../core/Transformable';
3import Displayable from '../graphic/Displayable';
4import { GradientObject } from '../graphic/Gradient';
5import { LinearGradientObject } from '../graphic/LinearGradient';
6import Path from '../graphic/Path';
7import { ImagePatternObject, PatternObject, SVGPatternObject } from '../graphic/Pattern';
8import { RadialGradientObject } from '../graphic/RadialGradient';
9export declare function normalizeColor(color: string): {
10 color: string;
11 opacity: number;
12};
13export declare function isAroundZero(transform: number): boolean;
14export declare function round3(transform: number): number;
15export declare function round4(transform: number): number;
16export declare function round1(transform: number): number;
17export declare function getMatrixStr(m: MatrixArray): string;
18export declare const TEXT_ALIGN_TO_ANCHOR: {
19 left: string;
20 right: string;
21 center: string;
22 middle: string;
23};
24export declare function adjustTextY(y: number, lineHeight: number, textBaseline: CanvasTextBaseline): number;
25export declare function hasShadow(style: Displayable['style']): any;
26export declare function getShadowKey(displayable: Displayable): string;
27export declare function getClipPathsKey(clipPaths: Path[]): string;
28export declare function isImagePattern(val: any): val is ImagePatternObject;
29export declare function isSVGPattern(val: any): val is SVGPatternObject;
30export declare function isPattern(val: any): val is PatternObject;
31export declare function isLinearGradient(val: GradientObject): val is LinearGradientObject;
32export declare function isRadialGradient(val: GradientObject): val is RadialGradientObject;
33export declare function isGradient(val: any): val is GradientObject;
34export declare function getIdURL(id: string): string;
35export declare function getPathPrecision(el: Path): number;
36export declare function getSRTTransformString(transform: Partial<Pick<Transformable, TransformProp>>): string;
37export declare const encodeBase64: (str: string) => string;