Rectangle.ContainsLine

Rectangle.ContainsLine method

Determines whether the rectangle contains a line represented by two points.

public bool ContainsLine(double x1, double y1, double x2, double y2)
ParameterTypeDescription
x1DoubleThe X coordinate of the start point of the line.
y1DoubleThe Y coordinate of the start point of the line.
x2DoubleThe X coordinate of the end point of the line.
y2DoubleThe Y coordinate of the end point of the line.

Return Value

true if the rectangle contains the line; otherwise, false.

See Also