mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Activate resolving of self-intersections in boolean code.
Relates to #779
This commit is contained in:
parent
35f3ac87bf
commit
cdd0cee623
1 changed files with 8 additions and 10 deletions
|
@ -76,20 +76,18 @@ PathItem.inject(new function() {
|
|||
_path2.reverse();
|
||||
// Split curves at intersections on both paths. Note that for self
|
||||
// intersection, _path2 will be null and getIntersections() handles it.
|
||||
|
||||
// Without support for self-intersection
|
||||
// splitPath(Curve._filterIntersections(
|
||||
// _path1._getIntersections(_path2, null, []), true));
|
||||
|
||||
// console.time('inter');
|
||||
// console.time('intersection');
|
||||
var locations = _path1._getIntersections(_path2, null, []);
|
||||
// console.timeEnd('inter');
|
||||
if (_path2 && false) {
|
||||
// console.time('self');
|
||||
if (_path2) {
|
||||
// console.time('self-intersection');
|
||||
// Resolve self-intersections on both source paths and add them to
|
||||
// the locations too:
|
||||
_path1._getIntersections(null, null, locations);
|
||||
_path2._getIntersections(null, null, locations);
|
||||
// console.timeEnd('self');
|
||||
// console.timeEnd('self-intersection');
|
||||
}
|
||||
// console.timeEnd('intersection');
|
||||
splitPath(Curve._filterIntersections(locations, true));
|
||||
|
||||
var chain = [],
|
||||
|
@ -438,8 +436,8 @@ PathItem.inject(new function() {
|
|||
function tracePaths(segments, monoCurves, operation) {
|
||||
var segmentCount = 0;
|
||||
var pathCount = 0;
|
||||
var reportSegments = false && !window.silent;
|
||||
var reportWindings = false && !window.silent;
|
||||
var reportSegments = false && !window.silent;
|
||||
var textAngle = 0;
|
||||
var fontSize = 1 / paper.project.activeLayer.scaling.x;
|
||||
|
||||
|
|
Loading…
Reference in a new issue