Class: LeaferImage
Implements
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new LeaferImage(config
): LeaferImage
Parameters
Name | Type |
---|---|
config | ILeaferImageConfig |
Returns
Defined in
leafer/packages/image/image/src/LeaferImage.ts:37
Properties
innerId
• Readonly
innerId: number
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:12
view
• view: any
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:15
width
• width: number
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:17
height
• height: number
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:18
isSVG
• isSVG: boolean
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:20
hasOpacityPixel
• hasOpacityPixel: boolean
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:21
ready
• ready: boolean
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:25
error
• error: IObject
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:26
loading
• loading: boolean
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:27
use
• use: number
= 0
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:29
config
• config: ILeaferImageConfig
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:31
waitComplete
• Protected
waitComplete: IFunction
[] = []
Defined in
leafer/packages/image/image/src/LeaferImage.ts:33
cache
• Protected
cache: ILeaferImageCacheCanvas
Defined in
leafer/packages/image/image/src/LeaferImage.ts:35
Accessors
url
• get
url(): string
Returns
string
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:13
completed
• get
completed(): boolean
Returns
boolean
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:23
Methods
load
▸ load(onSuccess?
, onError?
): number
Parameters
Name | Type |
---|---|
onSuccess? | IFunction |
onError? | IFunction |
Returns
number
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:44
unload
▸ unload(index
, stopEvent?
): void
Parameters
Name | Type |
---|---|
index | number |
stopEvent? | boolean |
Returns
void
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:62
onComplete
▸ onComplete(isSuccess
): void
Parameters
Name | Type |
---|---|
isSuccess | boolean |
Returns
void
Defined in
leafer/packages/image/image/src/LeaferImage.ts:71
getCanvas
▸ getCanvas(width
, height
, opacity?
, _filters?
): any
Parameters
Name | Type |
---|---|
width | number |
height | number |
opacity? | number |
_filters? | IObject |
Returns
any
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:87
getPattern
▸ getPattern(canvas
, repeat
, transform?
, paint?
): CanvasPattern
Parameters
Name | Type |
---|---|
canvas | any |
repeat | string |
transform? | IMatrixData |
paint? | ILeaferImagePatternPaint |
Returns
CanvasPattern
Implementation of
Defined in
leafer/packages/image/image/src/LeaferImage.ts:107
destroy
▸ destroy(): void
Returns
void