Hi,
You can check whether a given line segment intersects the bounds of a shape by using the following piece of code:
NShape shape = null;
NLineSegmentF lineSegment = new NLineSegmentF(0, 0, 100, 100);
if (lineSegment.IntersectsWith(shape.Bounds))
{
// The line segment intersects the shape bounds
}
Similarly, you can test for rectangle intersections – just use the corresponding methods of the NRectangleF class.
Best Regards,
Nevron Support Team