mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Remove TestOnCurve method
This commit is contained in:
parent
9831720c9c
commit
3b85d3d990
1 changed files with 4 additions and 21 deletions
|
@ -249,27 +249,10 @@ PathItem.inject(new function() {
|
||||||
return result.reduce();
|
return result.reduce();
|
||||||
}
|
}
|
||||||
|
|
||||||
function testOnCurve(path, point) {
|
// Boolean operators return true if a curve with the given winding
|
||||||
var curves = path.getCurves(),
|
// contribution contributes to the final result or not. They are called
|
||||||
bounds = path.getBounds();
|
// for each curve in the graph after curves in the operands are
|
||||||
if (bounds.contains(point)) {
|
// split at intersections.
|
||||||
for (var i = 0, l = curves.length; i < l; i++) {
|
|
||||||
var curve = curves[i];
|
|
||||||
if (curve.getBounds().contains(point)
|
|
||||||
&& curve.getParameterOf(point))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Boolean operators are binary operator functions of the form:
|
|
||||||
// function(isPath1, isInPath1, isInPath2)
|
|
||||||
//
|
|
||||||
// Operators return true if a segment in the operands is to be discarded.
|
|
||||||
// They are called for each segment in the graph after all the intersections
|
|
||||||
// between the operands are calculated and curves in the operands were split
|
|
||||||
// at intersections.
|
|
||||||
return /** @lends Path# */{
|
return /** @lends Path# */{
|
||||||
/**
|
/**
|
||||||
* Merges the geometry of the specified path from this path's
|
* Merges the geometry of the specified path from this path's
|
||||||
|
|
Loading…
Reference in a new issue