RectangleF Structure

Stores a set of four floating-point numbers that represent the location and size of a rectangle. For more advanced region functions, use a Region object.

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.8.0.0 (20.8.0)
Syntax
C#
public struct RectangleF

The RectangleF type exposes the following members.

Constructors
  NameDescription
Public methodRectangleF(PointF, SizeF)
Initializes a new instance of the RectangleF structure with the specified location and size.
Public methodRectangleF(Single, Single, Single, Single)
Initializes a new instance of the RectangleF structure with the specified location and size.
Properties
  NameDescription
Public propertyBottom
Gets the y-coordinate that is the sum of Y and Height of this RectangleF structure.
Public propertyHeight
Gets or sets the height of this RectangleF structure.
Public propertyIsEmpty
Gets a value indicating whether the Width or Height property of this RectangleF has a value of zero.
Public propertyLeft
Gets the x-coordinate of the left edge of this RectangleF structure.
Public propertyLocation
Gets or sets the coordinates of the upper-left corner of this RectangleF structure.
Public propertyRight
Gets the x-coordinate that is the sum of X and Width of this RectangleF structure.
Public propertySize
Gets or sets the size of this RectangleF.
Public propertyTop
Gets the y-coordinate of the top edge of this RectangleF structure.
Public propertyWidth
Gets or sets the width of this RectangleF structure.
Public propertyX
Gets or sets the x-coordinate of the upper-left corner of this RectangleF structure.
Public propertyY
Gets or sets the x-coordinate of the upper-left corner of this RectangleF structure.
Methods
  NameDescription
Public methodContains(PointF)
Determines if the specified point is contained within this RectangleF structure.
Public methodContains(RectangleF)
Determines if the rectangular region represented by rect is entirely contained within this RectangleF structure.
Public methodContains(Single, Single)
Determines if the specified point is contained within this RectangleF structure.
Public methodEquals
Determines whether the specified Object, is equal to this instance.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberFromLTRB
Creates a RectangleF structure with upper-left corner and lower-right corner at the specified locations.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodInflate(SizeF)
Inflates this RectangleF by the specified amount.
Public methodInflate(Single, Single)
Inflates this RectangleF structure by the specified amount.
Public methodStatic memberInflate(RectangleF, Single, Single)
Creates and returns an inflated copy of the specified RectangleF structure. The copy is inflated by the specified amount. The original rectangle remains unmodified.
Public methodIntersect(RectangleF)
Replaces this RectangleF structure with the intersection of itself and the specified RectangleF structure.
Public methodStatic memberIntersect(RectangleF, RectangleF)
Returns a RectangleF structure that represents the intersection of two rectangles. If there is no intersection, and empty RectangleF is returned.
Public methodIntersectsWith
Determines if this rectangle intersects with rect.
Public methodOffset(PointF)
Adjusts the location of this rectangle by the specified amount.
Public methodOffset(Single, Single)
Adjusts the location of this rectangle by the specified amount.
Public methodToString
Converts to string.
(Overrides ValueTypeToString.)
Public methodStatic memberUnion
Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.
Operators
  NameDescription
Public operatorStatic memberEquality
Tests whether two RectangleF structures have equal location and size.
Public operatorStatic member(Rectangle to RectangleF)
Converts the specified Rectangle structure to a RectangleF structure.
Public operatorStatic memberInequality
Tests whether two RectangleF structures differ in location or size.
Fields
  NameDescription
Public fieldStatic memberEmpty
Represents an instance of the RectangleF class with its members uninitialized.
See Also