StructRadRect
Represents a Rectangle in the Euclidean plane geometry.
Definition
Namespace:Telerik.Charting
Assembly:Telerik.WinControls.dll
Syntax:
public struct RadRect
Inherited Members
Constructors
RadRect(RadPoint, RadPoint)
Initializes a new instance of the RadRect struct.
RadRect(double, double)
Initializes a new instance of the RadRect struct.
RadRect(double, double, double, double)
Initializes a new instance of the RadRect struct.
Fields
Empty
Empty rectangle which values are zeroes.
Height
The length of the rectangle along the Y-axis.
Invalid
Invalid rectangle, which Width and Height properties are set to (-1).
Width
The length of the rectangle along the X-axis.
Properties
Bottom
Gets the Y-coordinate of the bottom side of the rectangle.
Center
Gets the center of this rectangle.
Location
Gets the location (Top-Left corner) of the rectangle.
Methods
CenterRect(RadRect, RadRect)
Centers the specified rectangle within the provided available one.
Contains(double, double)
Determines if this RadRect instance contains the point that is described by the arguments.
Equals(object)
Determines whether the specified object is equal to this instance.
Floor(RadRect)
Rounds the rectangle's value to the closest less than or equal to whole numbers.
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
IntersectsWith(RadRect)
Determines whether the current rect intersects with the specified one.
IsSizeValid()
Determines whether the size of this rect is valid - that is both Width and Height should be bigger than zero.
Round(RadRect)
Rounds the rectangle's values by respecting the Width and Height.
RoundByRespectingLocation(double, double, double, double)
Rounds the rectangle's values by respecting the X and Right and respecting the Y and Bottom. (0.4, 0, 2.2, 0) results in (0, 0, 3, 0). Note: original width = 3, result width = 2.2; original right = 2.6, result right = 3. (0.4, 0, 2.0, 0) results in (0, 0, 2, 0). (0.6, 0, 1.8, 0) results in (1, 0, 1, 0). Note: original width = 1.8, result width = 1; original right = 2.4, result right = 2. (0.6, 0, 2.0, 0) results in (1, 0, 2, 0).
Subtract(RadRect, RadRect)
Gets the difference between two RadRect structures.
Declaration
public static RadThickness Subtract(RadRect rect1, RadRect rect2)
Parameters
rect1
rect2
Returns
ToSquare(RadRect, bool)
Gets a rectangle that has equal width and height and is centered within the specified rect.
Operators
operator !=(RadRect, RadRect)
Determines whether two RadRect structures are not equal.
operator ==(RadRect, RadRect)
Determines whether two RadRect structures are equal.