diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 64418333..75575337 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -100,7 +100,7 @@ PathItem.inject(new function() { for (var i = 0, l = paths.length; i < l; i++) { var path = paths[i]; segments.push.apply(segments, path._segments); - curves.push.apply(curves, path._getCurves()); + curves.push.apply(curves, path.getCurves()); // Keep track if there are valid intersections other than // overlaps in each path. path._overlapsOnly = path._validOverlapsOnly = true; @@ -727,7 +727,7 @@ PathItem.inject(new function() { * @return {Number} the winding number */ _getWinding: function(point, horizontal) { - return getWinding(point, this._getCurves(), horizontal).winding; + return getWinding(point, this.getCurves(), horizontal).winding; }, /** @@ -962,15 +962,6 @@ PathItem.inject(new function() { }); Path.inject(/** @lends Path# */{ - /** - * Private method that returns and caches all the curves in this Path, - * which are monotonically decreasing or increasing in the y-direction. - * Used by getWinding(). - */ - _getCurves: function() { - return this.getCurves(); - }, - /** * Returns a point that is guaranteed to be inside the path. * @@ -1029,23 +1020,4 @@ Path.inject(/** @lends Path# */{ } return point; } - - - - -}); - -CompoundPath.inject(/** @lends CompoundPath# */{ - /** - * Private method that returns all the curves in this CompoundPath, which - * are monotonically decreasing or increasing in the 'y' direction. - * Used by getWinding(). - */ - _getCurves: function() { - var children = this._children, - curves = []; - for (var i = 0, l = children.length; i < l; i++) - curves.push.apply(curves, children[i]._getCurves()); - return curves; - } });