Methods
create
- create(width: number, height: number): any
-
Parameters
-
width: number
-
height: number
Returns any
createImage
- createImage(data: string | Buffer | Uint8Array | Blob, contentType: string): Promise<GeoPackageImage>
-
Parameters
-
data: string | Buffer | Uint8Array | Blob
-
contentType: string
createImageData
- createImageData(width: any, height: any): ImageData
-
Returns ImageData
disposeCanvas
- disposeCanvas(canvas: any): any
-
Returns any
drawText
- drawText(context: any, text: string, location: number[], fontFace: string, fontSize: number, fontColor: string): void
-
Parameters
-
context: any
-
text: string
-
location: number[]
-
fontFace: string
-
fontSize: number
-
fontColor: string
Returns void
initialize
- initialize(): Promise<void>
-
Returns Promise<void>
isInitialized
- isInitialized(): boolean
-
Returns boolean
measureText
- measureText(context: any, fontFace: string, fontSize: number, text: string): number
-
Parameters
-
context: any
-
fontFace: string
-
fontSize: number
-
text: string
Returns number
mergeCanvas
- mergeCanvas(fromCanvas: any, toContext: any): void
-
Parameters
-
fromCanvas: any
-
toContext: any
Returns void
scaleImageToDimensions
- scaleImageToDimensions(image: GeoPackageImage, scaledWidth: number, scaledHeight: number): Promise<GeoPackageImage>
-
Parameters
-
-
scaledWidth: number
-
scaledHeight: number
toBytes
- toBytes(canvas: any, imageFormat: ImageType, compressionQuality?: number): Promise<Uint8Array>
-
Parameters
-
canvas: any
-
-
Optional
compressionQuality: number
Returns Promise<Uint8Array>
toDataURL
- toDataURL(canvas: any, format: string, quality?: number): Promise<string>
-
Parameters
-
canvas: any
-
format: string
-
Optional
quality: number
Returns Promise<string>
writeImageToBytes
- writeImageToBytes(image: GeoPackageImage, imageFormat: ImageType, compressionQuality: number): Promise<Uint8Array>
-
Parameters
-
-
-
compressionQuality: number
Returns Promise<Uint8Array>
Creates a canvas object