Struct
RectangleU

Stores a set of four Unit-based numbers that represent the location and size of a rectangle.

Definition

Namespace:Telerik.Reporting.Drawing

Assembly:Telerik.Reporting.dll

Syntax:

cs-api-definition
public struct RectangleU

Constructors

RectangleU(PointU, SizeU)

Initializes a new instance of the RectangleU class with the specified location and size.

Declaration

cs-api-definition
public RectangleU(PointU location, SizeU size)

Parameters

location

PointU

A PointU that represents the upper-left corner of the rectangular region.

size

SizeU

A SizeU that represents the width and height of the rectangular region.

RectangleU(Rectangle)

Initializes a new instance of the RectangleU class from the specified Rectangle in device-independent pixels.

Declaration

cs-api-definition
public RectangleU(Rectangle rectangleDips)

Parameters

rectangleDips

Rectangle

A Rectangle that represents the rectangular region.

RectangleU(RectangleF)

Initializes a new instance of the RectangleU class from the specified RectangleF in device-independent pixels.

Declaration

cs-api-definition
public RectangleU(RectangleF rectangleDips)

Parameters

rectangleDips

RectangleF

A RectangleF that represents the rectangular region.

RectangleU(Unit, Unit, Unit, Unit)

Initializes a new instance of the RectangleU class with the specified location and size.

Declaration

cs-api-definition
public RectangleU(Unit x, Unit y, Unit width, Unit height)

Parameters

x

Unit

The x-coordinate of the upper-left corner of the rectangle.

y

Unit

The y-coordinate of the upper-left corner of the rectangle.

width

Unit

The width of the rectangle.

height

Unit

The height of the rectangle.

Fields

Empty

Represents an instance of the RectangleU class with its members uninitialized.

Declaration

cs-api-definition
public static readonly RectangleU Empty

Field Value

RectangleU

Remarks

The members of the new RectangleU are left uninitialized.

Properties

Bottom

Gets the y-coordinate that is the sum of Y and Height of this RectangleU structure.

Declaration

cs-api-definition
[Browsable(false)]
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 RectangleU structure.

Declaration

cs-api-definition
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 RectangleU have a value of zero.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsEmpty { get; }

Property Value

bool

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 RectangleU structure.

Declaration

cs-api-definition
[Browsable(false)]
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 RectangleU structure.

Declaration

cs-api-definition
[Browsable(false)]
public PointU Location { get; set; }

Property Value

PointU

A PointU that represents the upper-left corner of this RectangleF structure.

Right

Gets the x-coordinate that is the sum of X and Width of this RectangleU structure.

Declaration

cs-api-definition
[Browsable(false)]
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 RectangleU.

Declaration

cs-api-definition
[Browsable(false)]
public SizeU Size { get; set; }

Property Value

SizeU

A SizeU that represents the width and height of this RectangleU structure.

Top

Gets the y-coordinate of the left edge of this RectangleU structure.

Declaration

cs-api-definition
[Browsable(false)]
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 RectangleU structure.

Declaration

cs-api-definition
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 RectangleU structure.

Declaration

cs-api-definition
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 RectangleU structure.

Declaration

cs-api-definition
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

cs-api-definition
public bool Contains(PointU pt)

Parameters

pt

PointU

The PointU to test.

Returns

bool

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

cs-api-definition
public bool Contains(RectangleU rect)

Parameters

rect

RectangleU

The RectangleF to test.

Returns

bool

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

cs-api-definition
public bool Contains(Unit x, Unit y)

Parameters

x

Unit

The x-coordinate of the point to test.

y

Unit

The x-coordinate of the point to test.

Returns

bool

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 RectangleU with the same location and size of this RectangleU.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to test.

Returns

bool

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 ValueType.Equals(object)

GetHashCode()

Returns a hash code for this RectangleU structure.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this RectangleU structure.

Overrides ValueType.GetHashCode()

Inflate(RectangleU, Unit, Unit)

Inflates rect by the specified amount.

Declaration

cs-api-definition
public static RectangleU Inflate(RectangleU rect, Unit x, Unit y)

Parameters

rect

RectangleU

The RectangleU structure to inflate.

x

Unit

The amount to inflate this RectangleU structure horizontally.

y

Unit

The amount to inflate this RectangleU structure vertically.

Returns

RectangleU

The inflated RectangleU structure.

Inflate(SizeU)

Inflates this RectangleU structure by the specified amount.

Declaration

cs-api-definition
public void Inflate(SizeU size)

Parameters

size

SizeU

The amount to inflate this rectangle.

Inflate(Unit, Unit)

Inflates this RectangleU structure by the specified amount.

Declaration

cs-api-definition
public void Inflate(Unit width, Unit height)

Parameters

width

Unit

The amount to inflate this RectangleU structure horizontally.

height

Unit

The amount to inflate this RectangleU structure vertically.

IntersectsWith(RectangleU)

Determines if this rectangle intersects with rect.

Declaration

cs-api-definition
public bool IntersectsWith(RectangleU rect)

Parameters

rect

RectangleU

The rectangle to test.

Returns

bool

This method returns true if there is any intersection; otherwise false.

Offset(PointU)

Adjusts the location of this rectangle by the specified amount.

Declaration

cs-api-definition
public void Offset(PointU pos)

Parameters

pos

PointU

The amount to offset the location.

Offset(Unit, Unit)

Adjusts the location of this rectangle by the specified amount.

Declaration

cs-api-definition
public void Offset(Unit x, Unit y)

Parameters

x

Unit

The amount to offset the location horizontally.

y

Unit

The amount to offset the location vertically.

ToString()

Converts the Location and Size of this RectangleU to a human-readable string.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A human-readable representation of the rectangle.

Overrides ValueType.ToString()

ToString(CultureInfo)

Converts the Location and Size of this RectangleU to a human-readable string.

Declaration

cs-api-definition
public string ToString(CultureInfo culture)

Parameters

culture

CultureInfo

A CultureInfo object according to which to format the string.

Returns

string

A human-readable representation of the rectangle.

Operators

explicit operator Rectangle(RectangleU)

Converts the specified RectangleU structure to a Rectangle structure in device-dependent pixels.

Declaration

cs-api-definition
public static explicit operator Rectangle(RectangleU rect)

Parameters

rect

RectangleU

The RectangleU structure to convert.

Returns

Rectangle

The Rectangle structure that is converted from the specified RectangleU structure.

explicit operator RectangleF(RectangleU)

Converts the specified RectangleU structure to a RectangleF structure in device-dependent pixels.

Declaration

cs-api-definition
public static explicit operator RectangleF(RectangleU rect)

Parameters

rect

RectangleU

The RectangleU structure to convert.

Returns

RectangleF

The RectangleF structure that is converted from the specified RectangleU structure.

operator !=(RectangleU, RectangleU)

Tests whether two RectangleU structures differ in location or size.

Declaration

cs-api-definition
public static bool operator !=(RectangleU rect1, RectangleU rect2)

Parameters

rect1

RectangleU

The RectangleU structure that is to the left of the equality operator.

rect2

RectangleU

The RectangleU structure that is to the right of the equality operator.

Returns

bool

This operator returns true if any of the X, Y, Width, or Height properties of the two RectangleU structures are unequal; otherwise false.

operator ==(RectangleU, RectangleU)

Tests whether two RectangleU structures have equal location and size.

Declaration

cs-api-definition
public static bool operator ==(RectangleU rect1, RectangleU rect2)

Parameters

rect1

RectangleU

The RectangleU structure that is to the left of the equality operator.

rect2

RectangleU

The RectangleU structure that is to the right of the equality operator.

Returns

bool

This operator returns true if the two specified RectangleU structures have equal X, Y, Width, and Height properties.