canvas-transform-xy
v1.0.2
Published
当canvas画图的xy坐标超出画布时,截取画布大小内新的xy坐标
Downloads
2
Readme
canvas-transform-xy
Usage
import canvasTransFormXY from "canvas-transform-xy"
let newPointArrays=canvasTransFormXY(pointArray,width,height)
参数类型的描述:
1.(原坐标数组)pointArray:<{x:number,y:number}>[]
2.(画布宽度)width:number,
3.(画布高度)height:number
返回结果:
newPointArrays:最终截取画布内大小的坐标数组
Description
1.当canvas画图的xy坐标超出画布时,截取画布大小内新的xy坐标