Remove unnecessary paper namespace prefixes inside the library.

This commit is contained in:
Jürg Lehni 2014-02-17 20:36:18 +01:00
parent 92c13ae48b
commit 73627346c0

View file

@ -113,8 +113,8 @@ var PathItem = Item.extend(/** @lends PathItem# */{
// Check if extended handles of endpoints of this curve intersects // Check if extended handles of endpoints of this curve intersects
// each other. We cannot have a self intersection within this curve // each other. We cannot have a self intersection within this curve
// if they don't intersect due to convex-hull property. // if they don't intersect due to convex-hull property.
ix = new paper.Line(from._point.subtract(v1), v1.multiply(2), true) ix = new Line(from._point.subtract(v1), v1.multiply(2), true)
.intersect(new paper.Line(to._point.subtract(v2), .intersect(new Line(to._point.subtract(v2),
v2.multiply(2), true), false); v2.multiply(2), true), false);
if (ix) { if (ix) {
parts = paper.Curve.subdivide(values1); parts = paper.Curve.subdivide(values1);
@ -507,7 +507,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
if (seg._visited || !operator(seg._winding)) if (seg._visited || !operator(seg._winding))
continue; continue;
// Initialise a new path chain with the seed segment. // Initialise a new path chain with the seed segment.
path = new paper.Path(); path = new Path();
ixOther = seg._intersection; ixOther = seg._intersection;
startSegIx = ixOther ? ixOther._segment : null; startSegIx = ixOther ? ixOther._segment : null;
firstHandleIn = null; firstHandleIn = null;
@ -579,8 +579,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
firstHandleIn = nextHandleIn; firstHandleIn = nextHandleIn;
nextHandleIn = null; nextHandleIn = null;
} }
path.add(new paper.Segment(seg._point, nextHandleIn, path.add(new Segment(seg._point, nextHandleIn, nextHandleOut));
nextHandleOut));
seg._visited = true; seg._visited = true;
// Move to the next segment according to the traversal direction // Move to the next segment according to the traversal direction
seg = direction > 0 ? seg.getNext() : seg. getPrevious(); seg = direction > 0 ? seg.getNext() : seg. getPrevious();