RectangleF
Describes a rectanlge using float units.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public struct RectangleF
Constructors
Initializes a new instance of the RectangleF struct.
Initializes a new instance of the RectangleF struct.
Fields
Empty rectangle.
public static readonly RectangleF Empty
Properties
Gets the bottom.
[Browsable(false)]
public float Bottom { get; }
The bottom.
Gets the point halfway between the rectangle's horizontal and vertical edges.
public PointF Center { get; }
Gets or sets the height.
public float Height { readonly get; set; }
The height.
Gets a value indicating whether this instance is empty.
[Browsable(false)]
public bool IsEmpty { get; }
true if this instance is empty; otherwise, false.
Gets or sets the location.
[Browsable(false)]
public PointF Location { get; set; }
The location.
Gets the right.
[Browsable(false)]
public float Right { get; }
The right.
Gets or sets the size.
[Browsable(false)]
public SizeF Size { get; set; }
The size.
Gets or sets the width.
public float Width { readonly get; set; }
The width.
Gets or sets the x position.
public float X { readonly get; set; }
The x position.
Methods
Determines whether this instance contains the object.
public bool Contains(RectangleF rect)
The rect.
Returns:true if this instance contains the specified rect; otherwise, false.
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:
Creates a copy with each position and dimension rounded to the specified number of decimal places.
public RectangleF GetRoundedCopy(int decimals)
The number of decimal places to retain for each component.
Returns:A rounded copy; this rectangle is not modified.
Inflates the specified rect.
public static RectangleF Inflate(RectangleF rect, float x, float y)
The rect.
xfloatThe x.
yfloatThe y.
Returns:Inflates the specified size.
Returns the rectangular area shared by the two rectangles. If they do not overlap, returns Empty. Rectangles that touch only at an edge or corner produce an intersection with a zero width or height.
public static RectangleF Intersect(RectangleF rectangle1, RectangleF rectangle2)
The first rectangle.
rectangle2RectangleFThe second rectangle.
Returns:The intersection of the rectangles, or Empty when they do not overlap.
Intersects the specified rect.
Determines whether this instance intersects with another rectangle.
Moves the rectangle by the specified point without changing its dimensions.
public void Offset(PointF point)
The horizontal and vertical offsets to apply.
Returns a brace-delimited representation containing the X, Y, Width, and Height values.
public override string ToString()
A string containing this rectangle's position and dimensions.
Overrides:
Returns a rectangle spanning the minimum left and top edges and maximum right and bottom edges of both inputs.
public static RectangleF Union(RectangleF rectangle1, RectangleF rectangle2)
The first rectangle.
rectangle2RectangleFThe second rectangle.
Returns:A rectangle spanning both inputs.
Operators
Implements the operator !=.
public static bool operator !=(RectangleF left, RectangleF right)
The left.
rightRectangleFThe right.
Returns:The result of the operator.
Implements the operator ==.
public static bool operator ==(RectangleF left, RectangleF right)
The left.
rightRectangleFThe right.
Returns:The result of the operator.