zoom-image-data
v2.0.3
Published
zoom-image-data
Downloads
143
Readme
zoom-image-data
Installation
Install with npm:
npm install zoom-image-data
class ZoomImageData
Constructor
new ZoomImageData(param: param) => ZoomImageData
- param
inData: ArrayBuffer
Input Datainw: number
Width of input datainh: number
Height of input dataoutData: ArrayBuffer
Output Dataoutw: number
Width of output dataouth: number
Height of output datacellRatio?: number
(defalut: 1) Ratio = cellW / cellHcellWH?: number
(defalut: 10) Base cell sizesplitCell?: boolean
(defalut: false) Split CellsplitCellSize?: number
(defalut: 2) Split Cell Size
Instance Function
.update()
Update outputData.
.translate(dx: number, dy: number, silent?: boolean)
Translate on outdata.
- param
silent
(optional) Defaults to false, Whether update outData.
.zoom(cx: number, cy: number, ratio: number, silent?: boolean)
Scale ratio multiple at position(cx,cy) on outdata
.resize(silent?: boolean)
.updateMatrix(scale: number, dx: number, dy: number, silent?: boolean)
Update the transformation matrix.
.inCoorIsIn(x: number, y: number): boolean
.outCoorIsIn(x: number, y: number): boolean
.transInToOut(coors: number[])
.transOutToIn(coors: number[])