PaperJS如何在setZoom()之后将坐标设置为(0,0)

问题描述 投票:0回答:1

使用setZoom()后,Paper.js图像越界,如何将变焦绑定到左上方coordinate (0 , 0),,以便图像从中缩放? setZoom(85)上的实际结果:

Actual

预期的结果,当coordinates (0, 0):上的图像

Expected

javascript jquery paperjs
1个回答
0
投票

我发现,我需要将我的方法添加到paper.js。

setZoomToTopLeft: function (zoom)
{
    this.transform(new Matrix().scale(zoom / this.getZoom(),
        new Point(0, 0)));
},
© www.soinside.com 2019 - 2024. All rights reserved.