Rename Curve._addIntersections() to Curve.getIntersections()

This commit is contained in:
Jürg Lehni 2013-04-25 17:17:53 -07:00
parent eaa6e3bb6b
commit 1b5ca4dec9
2 changed files with 5 additions and 5 deletions

View file

@ -283,7 +283,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
},
getIntersections: function(curve) {
return Curve._addIntersections(this.getValues(), curve.getValues(),
return Curve.getIntersections(this.getValues(), curve.getValues(),
this, []);
},
@ -706,9 +706,9 @@ statics: {
},
// We need to provide the original left curve reference to the
// #_addIntersections() calls as it is required to create the resulting
// #getIntersections() calls as it is required to create the resulting
// CurveLocation objects.
_addIntersections: function(v1, v2, curve, locations) {
getIntersections: function(v1, v2, curve, locations) {
var bounds1 = Curve.getBounds(v1),
bounds2 = Curve.getBounds(v2);
/*#*/ if (options.debug) {
@ -758,7 +758,7 @@ statics: {
v2s = Curve.subdivide(v2);
for (var i = 0; i < 2; i++)
for (var j = 0; j < 2; j++)
this._addIntersections(v1s[i], v2s[j], curve, locations);
this.getIntersections(v1s[i], v2s[j], curve, locations);
}
}
return locations;

View file

@ -72,7 +72,7 @@ var PathItem = this.PathItem = Item.extend(/** @lends PathItem# */{
var curve = curves1[i],
values1 = curve.getValues();
for (var j = 0; j < length2; j++)
Curve._addIntersections(values1, values2[j], curve, locations);
Curve.getIntersections(values1, values2[j], curve, locations);
}
return locations;
},