mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add the pattern class to the fabric js typeings.
This commit is contained in:
Vendored
+28
@@ -607,6 +607,21 @@ declare module fabric {
|
||||
loadFromDatalessJSON(json, callback: () => void): void;
|
||||
}
|
||||
|
||||
export interface IPattern {
|
||||
(options: IPatternOptions): IPattern;
|
||||
|
||||
initialise(options: IPatternOptions): IPattern;
|
||||
|
||||
toLive(ctx: CanvasRenderingContext2D): IPattern;
|
||||
toObject(): any;
|
||||
toSVG(): string;
|
||||
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
repeat: string;
|
||||
source: any;
|
||||
}
|
||||
|
||||
export interface IBrightnessFilter {
|
||||
}
|
||||
export interface IInvertFilter {
|
||||
@@ -658,6 +673,13 @@ declare module fabric {
|
||||
stateful?: boolean;
|
||||
}
|
||||
|
||||
export interface IPatternOptions {
|
||||
source: () => any;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
repeat: string;
|
||||
}
|
||||
|
||||
export interface IRectOptions extends IObjectOptions {
|
||||
x?: number;
|
||||
y?: number;
|
||||
@@ -697,6 +719,12 @@ declare module fabric {
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
var Pattern: {
|
||||
new (options: IPatternOptions): IPattern;
|
||||
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
var Circle: {
|
||||
ATTRIBUTE_NAMES: string[];
|
||||
fromElement(element: SVGElement, options: ICircleOptions): ICircle;
|
||||
|
||||
Reference in New Issue
Block a user