API Reference
@univerjs
@univerjs/drawing
classes
Imageioservice

@univerjs/drawing v0.4.2Docs


Class: ImageIoService

Implements

Constructors

new ImageIoService()

new ImageIoService(): ImageIoService

Returns

ImageIoService

Properties

PropertyTypeDefined in
change$Observable<number>packages/drawing/src/services/image-io-impl.service.ts:29 (opens in a new tab)

Methods

addImageSourceCache()

addImageSourceCache(
   source, 
   imageSourceType, 
   imageSource): void

Parameters

ParameterType
sourcestring
imageSourceTypeImageSourceType
imageSourceNullable<HTMLImageElement>

Returns

void

Implementation of

IImageIoService.addImageSourceCache

Defined in

packages/drawing/src/services/image-io-impl.service.ts:46 (opens in a new tab)


getImage()

getImage(imageId): Promise<string>

Parameters

ParameterType
imageIdstring

Returns

Promise<string>

Implementation of

IImageIoService.getImage

Defined in

packages/drawing/src/services/image-io-impl.service.ts:53 (opens in a new tab)


getImageSourceCache()

getImageSourceCache(source, imageSourceType): undefined | HTMLImageElement

Parameters

ParameterType
sourcestring
imageSourceTypeImageSourceType

Returns

undefined | HTMLImageElement

Implementation of

IImageIoService.getImageSourceCache

Defined in

packages/drawing/src/services/image-io-impl.service.ts:37 (opens in a new tab)


saveImage()

saveImage(imageFile): Promise<Nullable<IImageIoServiceParam>>

Parameters

ParameterType
imageFileFile

Returns

Promise<Nullable<IImageIoServiceParam>>

Implementation of

IImageIoService.saveImage

Defined in

packages/drawing/src/services/image-io-impl.service.ts:57 (opens in a new tab)


setWaitCount()

setWaitCount(count): void

Parameters

ParameterType
countnumber

Returns

void

Implementation of

IImageIoService.setWaitCount

Defined in

packages/drawing/src/services/image-io-impl.service.ts:31 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.