mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add an optinonal dest parameter to Matrix#_transformPoint().
This commit is contained in:
parent
71bf4fdbca
commit
9384fb4fb5
1 changed files with 4 additions and 2 deletions
|
@ -301,10 +301,12 @@ var Matrix = this.Matrix = Base.extend({
|
|||
* A faster version of transform that only takes one point and does not
|
||||
* attempt to convert it.
|
||||
*/
|
||||
_transformPoint: function(point) {
|
||||
_transformPoint: function(point, dest) {
|
||||
var x = point.x,
|
||||
y = point.y;
|
||||
return Point.create(
|
||||
if (!dest)
|
||||
dest = new Point(Point.dont);
|
||||
return dest.set(
|
||||
x * this._m00 + y * this._m01 + this._m02,
|
||||
x * this._m10 + y * this._m11 + this._m12
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue