Piccolo.NET

PPath.Intersects Method (RectangleF, PMatrix)

Returns true if this path intersects the given rectangle.

public virtual bool Intersects(
   RectangleF bounds,
   PMatrix matrix
);

Parameters

bounds
The rectangle to check for intersection.
matrix
A matrix object that specifies a transform to apply to the path and bounds before checking for an intersection.

Return Value

True if this path intersects the given rectangle; otherwise, false.

Remarks

This method first checks if the interior of the path intersects with the rectangle. If not, the method then checks if the path bounding the pen stroke intersects with the rectangle. If either of these cases are true, this method returns true.

Performance Note: For some paths, this method can be very slow. This is due to the implementation of IsVisible. The problem usually occurs when many lines are joined at very steep angles. See PPath Overview for workarounds.

See Also

PPath Class | UMD.HCIL.Piccolo.Nodes Namespace | PPath.Intersects Overload List