From e6b7e9b2eb966a06ffcb93f87b8e57e3b964da28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 19 Feb 2014 17:56:22 +0100 Subject: [PATCH] Remove unused Curve#_getWinding() and commented out CompoundPath#_getWinding() code. --- src/path/CompoundPath.js | 8 -------- src/path/Curve.js | 22 ---------------------- 2 files changed, 30 deletions(-) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index 22f5ee2c..35d2f2fb 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -249,14 +249,6 @@ var CompoundPath = PathItem.extend(/** @lends CompoundPath# */{ return curves; }, - // _getWinding: function(point) { - // var children = this._children, - // winding = 0; - // for (var i = 0, l = children.length; i < l; i++) - // winding += children[i]._getWinding(point); - // return winding; - // }, - _getChildHitTestOptions: function(options) { // If we're not specifically asked to returns paths through // options.type == 'path' do not test children for fill, since a diff --git a/src/path/Curve.js b/src/path/Curve.js index 752d454f..278bf846 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -440,28 +440,6 @@ var Curve = Base.extend(/** @lends Curve# */{ return '{ ' + parts.join(', ') + ' }'; }, - /** - * Returns the winding contribution of this curve, to the parent path or - * CompoundPath it is part of. - */ - _getWinding: function() { - var path = this.getPath(); - if (!path) - // If this curve is not part of a path, - // the 'insideness' contribution of this curve is undefined. - return null; - var v = this.getValues(), - point = Curve.evaluate(v, 0.5, 0), - // Since we are using curves monotonic in Y direction, horizontal - // curves may report wrong winding contribution. See - // PathItem#_getWinding for details on how we resolve this issue. - tolerance = /*#=*/ Numerical.TOLERANCE, - horizontal = (Curve.isLinear(v) && Math.abs(v[1] - v[7]) < tolerance); - // Call the parent's _getWinding method - return (path._parent instanceof CompoundPath ? path._parent - : path)._getWinding(point, horizontal); - }, - // Mess with indentation in order to get more line-space below... statics: { getValues: function(segment1, segment2, matrix) {