RadRect
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
Fields
Invalid rectangle, which Width and Height properties are set to (-1).
public static readonly RadRect Invalid
Properties
Gets the Y-coordinate of the bottom side of the rectangle.
public double Bottom { get; }
Gets the location (Top-Left corner) of the rectangle.
public RadPoint Location { get; }
Gets the X-coordinate of the right side of the rectangle.
public double Right { get; }
Methods
Centers the specified rectangle within the provided available one.
public static RadRect CenterRect(RadRect rect, RadRect bounds)
The RadRect that should be moved to the new location.
boundsRadRectThe 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.
Determines if this RadRect instance contains the point that is described by the arguments.
Returns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides:
Returns the rectangle that results from expanding or shrinking the specified rectangle with the specified margins.
public static RadRect Inflate(RadRect rect, RadThickness margins)
The RadRect structure to modify.
marginsRadThicknessThe margins.
Returns:A new instance of RadRect with modified dimensions.
Finds the intersection of the current rectangle and the specified rectangle, and stores the result as the current rectangle.
public void Intersect(RadRect rect)
The rectangle to intersect with the current rectangle.
public static RadRect ToSquare(RadRect rect, bool offset)
The RadRect.
offsetboolSpecifies 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.