1 | import { ImageLike } from '../core/types';
|
2 | import { SVGVNode } from '../svg/core';
|
3 | declare type ImagePatternRepeat = 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
|
4 | export interface PatternObjectBase {
|
5 | id?: number;
|
6 | type?: 'pattern';
|
7 | x?: number;
|
8 | y?: number;
|
9 | rotation?: number;
|
10 | scaleX?: number;
|
11 | scaleY?: number;
|
12 | }
|
13 | export interface ImagePatternObject extends PatternObjectBase {
|
14 | image: ImageLike | string;
|
15 | repeat?: ImagePatternRepeat;
|
16 | imageWidth?: number;
|
17 | imageHeight?: number;
|
18 | }
|
19 | export interface InnerImagePatternObject extends ImagePatternObject {
|
20 | __image?: ImageLike;
|
21 | }
|
22 | export interface SVGPatternObject extends PatternObjectBase {
|
23 | svgElement?: SVGVNode;
|
24 | svgWidth?: number;
|
25 | svgHeight?: number;
|
26 | }
|
27 | export declare type PatternObject = ImagePatternObject | SVGPatternObject;
|
28 | declare class Pattern {
|
29 | type: 'pattern';
|
30 | image: ImageLike | string;
|
31 | svgElement: SVGElement | string;
|
32 | repeat: ImagePatternRepeat;
|
33 | x: number;
|
34 | y: number;
|
35 | rotation: number;
|
36 | scaleX: number;
|
37 | scaleY: number;
|
38 | constructor(image: ImageLike | string, repeat: ImagePatternRepeat);
|
39 | }
|
40 | export default Pattern;
|