mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Have Path always directly apply any transformation to its Segments.
This is required so the coordinates of its bounds, length and SegmentPoints are always in the same space.
This commit is contained in:
parent
97b66582f8
commit
627961627e
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
*
|
||||
* @extends PathItem
|
||||
*/
|
||||
// DOCS: Explain that path matrix is always applied with each transformation.
|
||||
var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||
/**
|
||||
* Creates a new Path item and places it at the top of the active layer.
|
||||
|
@ -206,6 +207,11 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
// path, with the added benefit that b can be < a, and closed looping is
|
||||
// taken into account.
|
||||
|
||||
// DOCS: Explain that path matrix is always applied with each transformation.
|
||||
transform: function(matrix) {
|
||||
this.base(matrix, true);
|
||||
},
|
||||
|
||||
_apply: function(matrix) {
|
||||
var coords = new Array(6);
|
||||
for (var i = 0, l = this._segments.length; i < l; i++) {
|
||||
|
|
Loading…
Reference in a new issue