intersection
Functions
exists()
g.intersection.exists(shape1, shape2 [, shape1Options, shape2Options])
Returns true
if two shapes intersect each other. The shape must be one of the following types:
g.intersection.exists(new g.Rect(0, 0, 10, 10), new g.Line({ x: 5, y: 5 }, { x: 30, y: 30 })); // true
Using the shape options is valid for Path only. The path is internally converted into polylines with toPolylines() method. The options control the conversion of the path.
g.intersection.exists(new g.Rect(), new g.Path(), null, { precision: 2 });
g.intersection.exists(new g.Path(), new g.Rect(), { precision: 2 });
g.intersection.exists(path1, path2, {
precision: 2
segmentSubdivisions: path1SegmentSubdivisions
}, {
precision: 2
segmentSubdivisions: path2SegmentSubdivisions
});