Interface IStaticCanvas

Hierarchy

Index

Properties

Methods

Properties

public EMPTY_JSON: string

public backgroundColor: string

public backgroundImage: string

public backgroundImageOpacity: number

public backgroundImageStretch: number

public controlsAboveOverlay: boolean

public includeDefaultValues: boolean

public overlayImage: string

public overlayImageLeft: number

public overlayImageTop: number

public renderOnAddition: boolean

public stateful: boolean

Methods

public add(object?: IObject[]): ICanvas

Parameters

Returns

ICanvas

public bringForward(object: IObject): ICanvas

Parameters

Returns

ICanvas

public calcOffset(): ICanvas

Returns

ICanvas

public centerObject(object: IObject): ICanvas

Parameters

Returns

ICanvas

public centerObjectH(object: IObject): ICanvas

Parameters

Returns

ICanvas

public centerObjectV(object: IObject): ICanvas

Parameters

Returns

ICanvas

public clear(): ICanvas

Returns

ICanvas

public clearContext(context: CanvasRenderingContext2D): ICanvas

Parameters

  • context: CanvasRenderingContext2D

Returns

ICanvas

public clipTo(clipFunction: (context: CanvasRenderingContext2D) => void): any

Parameters

  • clipFunction: (context: CanvasRenderingContext2D) => void

Returns

any

public complexity(): number

Returns

number

public dispose(): ICanvas

Returns

ICanvas

public drawControls(): any

Returns

any

public fire(eventName: string, options: any): any

Parameters

  • eventName: string
  • options: any

Returns

any

public forEachObject(callback: (object: fabric.IObject) => void, context?: CanvasRenderingContext2D): ICanvas

Parameters

  • callback: (object: fabric.IObject) => void
  • context?: CanvasRenderingContext2D optional

Returns

ICanvas

public getActiveGroup(): IGroup

Returns

IGroup

public getActiveObject(): IObject

Returns

IObject

public getCenter(): IObject

Returns

IObject

public getContext(): CanvasRenderingContext2D

Returns

CanvasRenderingContext2D

public getElement(): HTMLCanvasElement

Returns

HTMLCanvasElement

public getHeight(): number

Returns

number

public getObjects(): IObject[]

Returns

IObject[]

public getWidth(): number

Returns

number

public insertAt(object: IObject, index: number, nonSplicing: boolean): ICanvas

Parameters

  • object: IObject
  • index: number
  • nonSplicing: boolean

Returns

ICanvas

public isEmpty(): boolean

Returns

boolean

public item(index: number): IObject

Parameters

  • index: number

Returns

IObject

public observe(eventCollection: IEventList): any

Parameters

Returns

any

public observe(eventName: string, handler: (e: any) => any): any

Parameters

  • eventName: string
  • handler: (e: any) => any

Returns

any

public off(eventName: any, handler: any): any

Parameters

  • eventName: any
  • handler: any

Returns

any

public on(eventCollection: IEventList): any

Parameters

Returns

any

public on(eventName: string, handler: (e: any) => any): any

Parameters

  • eventName: string
  • handler: (e: any) => any

Returns

any

public onBeforeScaleRotate(target: IObject): any

Parameters

Returns

any

public remove(object: IObject): IObject

Parameters

Returns

IObject

public renderAll(allOnTop?: boolean): ICanvas

Parameters

  • allOnTop?: boolean optional

Returns

ICanvas

public renderTop(): ICanvas

Returns

ICanvas

public sendBackwards(object: IObject): ICanvas

Parameters

Returns

ICanvas

public sendToBack(object: IObject): ICanvas

Parameters

Returns

ICanvas

public setBackgroundImage(object: IObject): ICanvas

Parameters

Returns

ICanvas

public setDimensions(object: { width: number; height: number; }): ICanvas

Parameters

  • object: { width: number; height: number; }

Returns

ICanvas

public setHeight(height: number): ICanvas

Parameters

  • height: number

Returns

ICanvas

public setOverlayImage(url: string, callback: () => any, options: any): ICanvas

Parameters

  • url: string
  • callback: () => any
  • options: any

Returns

ICanvas

public setWidth(width: number): ICanvas

Parameters

  • width: number

Returns

ICanvas

public stopObserving(eventName: string, handler: (e: any) => any): any

Parameters

  • eventName: string
  • handler: (e: any) => any

Returns

any

public supports(methodName: string): boolean

Parameters

  • methodName: string

Returns

boolean

public toDataURL(format: string, quality?: number): string

Parameters

  • format: string
  • quality?: number optional

Returns

string

public toDataURLWithMultiplier(propertiesToInclude: Array<any>): string

Parameters

  • propertiesToInclude: Array<any>

Returns

string

public toDatalessJSON(propertiesToInclude?: Array<any>): string

Parameters

  • propertiesToInclude?: Array<any> optional

Returns

string

public toDatalessObject(propertiesToInclude?: Array<any>): string

Parameters

  • propertiesToInclude?: Array<any> optional

Returns

string

public toGrayscale(propertiesToInclude: Array<any>): string

Parameters

  • propertiesToInclude: Array<any>

Returns

string

public toJSON(propertiesToInclude: Array<any>): string

Parameters

  • propertiesToInclude: Array<any>

Returns

string

public toObject(propertiesToInclude: Array<any>): string

Parameters

  • propertiesToInclude: Array<any>

Returns

string

public toSVG(): string

Returns

string

public tostring(): string

Returns

string