Class RadRect
Represents a Rectangle in the Euclidean plane geometry.
Inheritance
Namespace: Telerik.Charting
Assembly: Telerik.Windows.Controls.Chart.dll
Syntax
public sealed class RadRect : ValueType
Constructors
RadRect(Double, Double)
Initializes a new instance of the Rad
Declaration
public RadRect(double width, double height)
Parameters
System. The width. |
System. The height. |
RadRect(Double, Double, Double, Double)
Initializes a new instance of the Rad
Declaration
public RadRect(double x, double y, double width, double height)
Parameters
System. The X coordinate of the Top-Left corner. |
System. The Y coordinate of the Top-Left corner. |
System. The width. |
System. The height. |
RadRect(RadPoint, RadPoint)
Initializes a new instance of the Rad
Declaration
public RadRect(RadPoint point1, RadPoint point2)
Parameters
RadRect(RadPoint, RadSize)
Initializes a new instance of the Rad
Declaration
public RadRect(RadPoint location, RadSize size)
Parameters
Fields
Empty
Empty rectangle which values are zeroes.
Declaration
public static readonly RadRect Empty
Field Value
Height
The length of the rectangle along the Y-axis.
Declaration
public double Height
Field Value
System.
|
Invalid
Invalid rectangle, which Width and Height properties are set to (-1).
Declaration
public static readonly RadRect Invalid
Field Value
Width
The length of the rectangle along the X-axis.
Declaration
public double Width
Field Value
System.
|
X
The X-coordinate of the rectangle.
Declaration
public double X
Field Value
System.
|
Y
The Y-coordinate of the rectangle.
Declaration
public double Y
Field Value
System.
|
Properties
Bottom
Gets the Y-coordinate of the bottom side of the rectangle.
Declaration
public double Bottom { get; }
Property Value
System.
|
Center
Gets the center of this rectangle.
Declaration
public RadPoint Center { get; }
Property Value
IsEmpty
Gets indicating if the Rad
Declaration
public bool IsEmpty { get; }
Property Value
System.
|
Location
Gets the location (Top-Left corner) of the rectangle.
Declaration
public RadPoint Location { get; }
Property Value
Right
Gets the X-coordinate of the right side of the rectangle.
Declaration
public double Right { get; }
Property Value
System.
|
Size
Gets the size the Rad
Declaration
public RadSize Size { get; }
Property Value
Rad The size. |
Methods
CenterRect(RadRect, RadRect)
Centers the specified rectangle within the provided available one.
Declaration
public static RadRect CenterRect(RadRect rect, RadRect bounds)
Parameters
Rad The Rad |
Rad The Rad |
Returns
Contains(Double, Double)
Determines if this Rad
Declaration
public bool Contains(double x, double y)
Parameters
System. The X coordinate of the point to check. |
System. The Y coordinate of the point to check. |
Returns
System. Returns true if this rectangle contains the point from the arguments and false otherwise. |
Equals(Object)
Determines whether the specified System.
Declaration
public override bool Equals(object obj)
Parameters
System. The System. |
Returns
System.
|
Floor(RadRect)
Rounds the rectangle's value to the closest less than or equal to whole numbers.
Declaration
public static RadRect Floor(RadRect rect)
Parameters
Returns
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Inflate(RadRect, RadThickness)
Returns the rectangle that results from expanding or shrinking the specified rectangle with the specified margins.
Declaration
public static RadRect Inflate(RadRect rect, RadThickness margins)
Parameters
Rad The Rad |
Rad The margins. |
Returns
Intersect(RadRect)
Finds the intersection of the current rectangle and the specified rectangle, and stores the result as the current rectangle.
Declaration
public void Intersect(RadRect rect)
Parameters
Rad The rectangle to intersect with the current rectangle. |
IntersectsWith(RadRect)
Determines whether the current Rad
Declaration
public bool IntersectsWith(RadRect rect)
Parameters
Rad
|
Returns
System.
|
IsSizeValid()
Determines whether the size of this Rad
Declaration
public bool IsSizeValid()
Returns
System.
|
Round(RadRect)
Rounds the rectangle's values by respecting the Width and Height.
Declaration
public static RadRect Round(RadRect rect)
Parameters
Returns
Subtract(RadRect, RadRect)
Gets the difference between two Rad
Declaration
public static RadThickness Subtract(RadRect rect1, RadRect rect2)
Parameters
Returns
Rad A Rad |
ToSquare(RadRect, Boolean)
Declaration
public static RadRect ToSquare(RadRect rect, bool offset)
Parameters
Rad The Rad |
System. Specifies whether the resulting Rad |
Returns
Operators
Equality(RadRect, RadRect)
Determines whether two Rad
Declaration
public static bool operator ==(RadRect rect1, RadRect rect2)
Parameters
Returns
System.
|
Inequality(RadRect, RadRect)
Determines whether two Rad
Declaration
public static bool operator !=(RadRect rect1, RadRect rect2)
Parameters
Returns
System.
|