StructRadRect
Represents a Rectangle in the Euclidean plane geometry.
Definition
Namespace:Telerik.Charting
Assembly:Telerik.Windows.Controls.Chart.dll
Syntax:
public struct RadRect
Inherited Members
Constructors
RadRect(RadPoint, RadPoint)
Initializes a new instance of the RadRect struct.
RadRect(RadPoint, RadSize)
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.
Right
Gets the X-coordinate of the right side of the rectangle.
Methods
CenterRect(RadRect, RadRect)
Centers the specified rectangle within the provided available one.
Declaration
public static RadRect CenterRect(RadRect rect, RadRect bounds)
Parameters
rect
The RadRect that should be moved to the new location.
bounds
The RadRect that specifies the available bounds.
Returns
A new instance of RadRect with width and height as the given RadRect and placed in the center of the provided region.
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
Inflate(RadRect, RadThickness)
Returns the rectangle that results from expanding or shrinking the specified rectangle with the specified margins.
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
rect
The rectangle to intersect with the current rectangle.
IntersectsWith(RadRect)
Determines whether the current RadRect intersects with the specified one.
IsSizeValid()
Determines whether the size of this RadRect 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.
Subtract(RadRect, RadRect)
Gets the difference between two RadRect structures.
Declaration
public static RadThickness Subtract(RadRect rect1, RadRect rect2)
Parameters
rect1
The first RadRect.
rect2
The second RadRect.
Returns
A RadThickness instance, that represents the difference between the two RadRect instances.
ToSquare(RadRect, bool)
Declaration
public static RadRect ToSquare(RadRect rect, bool offset)
Parameters
rect
The RadRect.
offset
Specifies whether the resulting RadRect should keep the original Top-Left location or it should be centered within the original RadRect.
Returns
A new instance of RadRect with equal width and height, that fits within the provided bounds.
Operators
operator !=(RadRect, RadRect)
Determines whether two RadRect structures are not equal.
operator ==(RadRect, RadRect)
Determines whether two RadRect structures are equal.