Override #matrix accessors in Path to do nothing.

For the same reasons as described in the previous commit.
This commit is contained in:
Jürg Lehni 2011-12-23 22:46:53 +01:00
parent 627961627e
commit 98c82856ea

View file

@ -212,6 +212,17 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
this.base(matrix, true);
},
getMatrix: function() {
// Override matrix getter to always return null, since Paths act as if
// they do not have a matrix, and always directly apply transformations
// to their segment points.
return null;
},
setMatrix: function(matrix) {
// Do nothing for the same reason as above.
},
_apply: function(matrix) {
var coords = new Array(6);
for (var i = 0, l = this._segments.length; i < l; i++) {
@ -1413,6 +1424,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
drawSegment(0);
}
// XXX: Make this work with global matrices?
function drawDashes(ctx, path, dashArray, dashOffset) {
var flattener = new PathFlattener(path),
from = dashOffset, to,