Struct RectangleU
Stores a set of four Unit-based numbers that represent the location and size of a rectangle.
Namespace: Telerik.Reporting.Drawing
Assembly: Telerik.Reporting.dll
Syntax
public struct RectangleU
Remarks
A RectangleU is defined by its width, height, and upper-left corner.
Constructors
RectangleU(Rectangle)
Initializes a new instance of the
Rectangle
Declaration
public RectangleU(Rectangle rectangleDips)
Parameters
System. A System. |
RectangleU(RectangleF)
Initializes a new instance of the
Rectangle
Declaration
public RectangleU(RectangleF rectangleDips)
Parameters
System. A System. |
RectangleU(PointU, SizeU)
Initializes a new instance of the
Rectangle
Declaration
public RectangleU(PointU location, SizeU size)
Parameters
RectangleU(Unit, Unit, Unit, Unit)
Initializes a new instance of the
Rectangle
Declaration
public RectangleU(Unit x, Unit y, Unit width, Unit height)
Parameters
Fields
Empty
Represents an instance of the
Rectangle
Declaration
public static readonly RectangleU Empty
Field Value
Remarks
The members of the new RectangleU are left uninitialized.
Properties
Bottom
Declaration
public Unit Bottom { get; }
Property Value
Unit
The y-coordinate that is the sum of Y and Height of this RectangleU structure. |
Height
Gets or sets the height of this
Rectangle
Declaration
public Unit Height { get; set; }
Property Value
Unit
The height of this RectangleF structure. |
IsEmpty
Tests whether the
X,
Y,
Width, and
Height
properties of this
Rectangle
Declaration
public bool IsEmpty { get; }
Property Value
System. This property returns true if the X, Y, Width, and Height properties of this RectangleU have a value of zero; otherwise, false. |
Left
Gets the x-coordinate of the left edge of this
Rectangle
Declaration
public Unit Left { get; }
Property Value
Unit
The x-coordinate of the left edge of this RectangleU structure. |
Location
Gets or sets the coordinates of the upper-left corner of this
Rectangle
Declaration
public PointU Location { get; set; }
Property Value
Right
Declaration
public Unit Right { get; }
Property Value
Unit
The x-coordinate that is the sum of X and Width of this RectangleU structure. |
Size
Gets or sets the size of this
Rectangle
Declaration
public SizeU Size { get; set; }
Property Value
Top
Gets the y-coordinate of the left edge of this
Rectangle
Declaration
public Unit Top { get; }
Property Value
Unit
The y-coordinate of the left edge of this RectangleU structure. |
Width
Gets or sets the width of this
Rectangle
Declaration
public Unit Width { get; set; }
Property Value
Unit
The width of this RectangleF structure. |
X
Gets or sets the x-coordinate of the upper-left corner of this
Rectangle
Declaration
public Unit X { get; set; }
Property Value
Unit
The x-coordinate of the upper-left corner of this RectangleF structure. |
Y
Gets or sets the y-coordinate of the upper-left corner of this
Rectangle
Declaration
public Unit Y { get; set; }
Property Value
Unit
The y-coordinate of the upper-left corner of this RectangleF structure. |
Methods
Contains(PointU)
Determines if the specified point is contained within this RectangleU structure.
Declaration
public bool Contains(PointU pt)
Parameters
Returns
System. This method returns true if the point represented by the pt parameter is contained within this RectangleU structure; otherwise false. |
Contains(RectangleU)
Determines if the rectangular region represented by rect is entirely contained within this RectangleU structure.
Declaration
public bool Contains(RectangleU rect)
Parameters
Rectangle The System. |
Returns
System. This method returns true if the rectangular region represented by rect is entirely contained within the rectangular region represented by this RectangleU; otherwise false. |
Contains(Unit, Unit)
Determines if the specified point is contained within this RectangleU structure.
Declaration
public bool Contains(Unit x, Unit y)
Parameters
Returns
System. This method returns true if the point defined by x and y is contained within this RectangleU structure; otherwise false. |
Equals(Object)
Tests whether obj is a
Rectangle
Declaration
public override bool Equals(object obj)
Parameters
System. The System. |
Returns
System. This method returns true if obj is a RectangleU and its X, Y, Width, and Height properties are equal to the corresponding properties of this RectangleU; otherwise, false. |
Overrides
GetHashCode()
Returns a hash code for this
Rectangle
Declaration
public override int GetHashCode()
Returns
System. An integer value that specifies a hash value for this RectangleU structure. |
Overrides
Inflate(RectangleU, Unit, Unit)
Inflates rect by the specified amount.
Declaration
public static RectangleU Inflate(RectangleU rect, Unit x, Unit y)
Parameters
Rectangle The Rectangle |
Unit
x
The amount to inflate this
Rectangle |
Unit
y
The amount to inflate this
Rectangle |
Returns
Rectangle The inflated RectangleU structure. |
Inflate(SizeU)
Inflates this RectangleU structure by the specified amount.
Declaration
public void Inflate(SizeU size)
Parameters
Size The amount to inflate this rectangle. |
Inflate(Unit, Unit)
Inflates this RectangleU structure by the specified amount.
Declaration
public void Inflate(Unit width, Unit height)
Parameters
Unit
width
The amount to inflate this
Rectangle |
Unit
height
The amount to inflate this
Rectangle |
IntersectsWith(RectangleU)
Determines if this rectangle intersects with rect.
Declaration
public bool IntersectsWith(RectangleU rect)
Parameters
Rectangle The rectangle to test. |
Returns
System. This method returns true if there is any intersection; otherwise false. |
Offset(PointU)
Adjusts the location of this rectangle by the specified amount.
Declaration
public void Offset(PointU pos)
Parameters
Point The amount to offset the location. |
Offset(Unit, Unit)
Adjusts the location of this rectangle by the specified amount.
Declaration
public void Offset(Unit x, Unit y)
Parameters
ToString()
Converts the Location and Size of this RectangleU to a human-readable string.
Declaration
public override string ToString()
Returns
System. A human-readable representation of the rectangle. |
Overrides
ToString(CultureInfo)
Converts the Location and Size of this RectangleU to a human-readable string.
Declaration
public string ToString(CultureInfo culture)
Parameters
System. A System. |
Returns
System. A human-readable representation of the rectangle. |
Operators
Equality(RectangleU, RectangleU)
Tests whether two RectangleU structures have equal location and size.
Declaration
public static bool operator ==(RectangleU rect1, RectangleU rect2)
Parameters
Rectangle The Rectangle |
Rectangle The Rectangle |
Returns
Explicit(RectangleU to Rectangle)
Converts the specified RectangleU structure to a
System.
Declaration
public static explicit operator Rectangle(RectangleU rect)
Parameters
Rectangle The Rectangle |
Returns
System. The Rectangle structure that is converted from the specified RectangleU structure. |
Explicit(RectangleU to RectangleF)
Converts the specified RectangleU structure to a
System.
Declaration
public static explicit operator RectangleF(RectangleU rect)
Parameters
Rectangle The Rectangle |
Returns
System. The RectangleF structure that is converted from the specified RectangleU structure. |
Inequality(RectangleU, RectangleU)
Tests whether two RectangleU structures differ in location or size.
Declaration
public static bool operator !=(RectangleU rect1, RectangleU rect2)
Parameters
Rectangle The Rectangle |
Rectangle The Rectangle |
Returns
System. This operator returns true if any of the
X,
Y,
Width, or
Height
properties of the two
Rectangle |