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:
Jürg Lehni 2011-12-23 22:43:27 +01:00
parent 97b66582f8
commit 627961627e

View file

@ -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++) {