轻量2D渲染库

Documents

http://pixijs.download/releas...

遇到的坑

如何获取绘制出的形状面积

const spaces = this.graph.spaces
const extract = this.renderer.plugins.extract
const graphics // 根据形状绘制方法,设置fillStyle重绘
graphics.beginFill(fillColor, fillAlpha)
const dimension = extract.pixels(graphics)/4
//  4: rgba 4个通道

spoonysnail
80 声望1 粉丝

引用和评论

0 条评论