mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Ue the faster Matrix#_transformPoint().
And reuse Point objects if possible.
This commit is contained in:
parent
d2869cfd55
commit
28806fe977
1 changed files with 2 additions and 2 deletions
|
@ -1971,7 +1971,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
|
||||
function add(point) {
|
||||
bounds = bounds.include(matrix
|
||||
? matrix.transform(point) : point);
|
||||
? matrix._transformPoint(point, point) : point);
|
||||
}
|
||||
|
||||
function addBevelJoin(curve, t) {
|
||||
|
@ -1987,7 +1987,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
if (join === 'round' || !segment._handleIn.isZero()
|
||||
&& !segment._handleOut.isZero()) {
|
||||
bounds = bounds.unite(joinBounds.setCenter(matrix
|
||||
? matrix.transform(segment._point) : segment._point));
|
||||
? matrix._transformPoint(segment._point) : segment._point));
|
||||
} else if (join == 'bevel') {
|
||||
var curve = segment.getCurve();
|
||||
addBevelJoin(curve, 0);
|
||||
|
|
Loading…
Reference in a new issue