feature: 图片保存裁剪区域比例
This commit is contained in:
parent
7f05fddb3d
commit
4005dd840e
@ -464,6 +464,10 @@ export default class Painter {
|
||||
this.ctx.drawImage(view.url, -(width / 2), -(height / 2), width, height);
|
||||
} else {
|
||||
this.ctx.drawImage(view.url, startX, startY, rWidth, rHeight, -(width / 2), -(height / 2), width, height);
|
||||
view.rect.startX = startX / view.sWidth;
|
||||
view.rect.startY = startY / view.sHeight;
|
||||
view.rect.endX = (startX + rWidth) / view.sWidth;
|
||||
view.rect.endY = (startY + rHeight) / view.sHeight;
|
||||
}
|
||||
this.ctx.restore();
|
||||
this._doBorder(view, width, height);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user