Table of Contents

TUIRectangle Structure

A platform independent rectangle. Coordinates are floating point numbers.

Syntax

Namespace: FlexCel.Core

public struct TUIRectangle

Constructors

Name Description
TUIRectangle Creates a new UIRectangle with the specified starting point, height and width.

Methods

Name Description
Contains Returns true if point is inside the rectangle.
FromLTRB Creates a new rectangle with the specified coordinates.
FullyInside Returns true if this rectangle is fully inside other.
FullyOutside Returns true if this rectangle is fully outside other.
Inflate Overloaded
Inflate(Double, Double)
Inflate(TUIRectangle, Double, Double)
Intersect Returns a rectangle which is the intersection of this one and the new one.
MakePositive This method ensures both width adn height are positive. If they are negative, X and Y are moved so the rectangle is the same but with positive dimensions.
Offset Moves the rectangle by (dx, dy), keeping the with and height the same.
ToString Returns a string with the rectangle's data.
Union Returns a new rectangle which contains both of the source rectangles.

Operators

Properties

Name Description
Bottom Bottom coordinate.
BottomRight Returns a TPointF with the Right and Bottom coordinates of the rectangle.
Empty Returns a rectangle with X = 0, Y = 0, Width = 0 and Height = 0.
Height Height of the rectangle.
Left Left coordinate. This is the same as X, but it is readonly. (X is read write).
Location Returns a TPointF with the Left and Top coordinates of the rectangle.
Right Right coordinate.
Top Top coordinate. This is the same as Y, but it is readonly. (Y is read write).
Width Width of the rectangle.
X Left coordinate of the rectangle.
Y Top coordinate of the rectangle.