TRect

Rectangle in a plane

Declaration

Source position: typshrdh.inc line 101

Type
TRect = packed record
private
  function getHeight : LongInt;
  function getLocation : TPoint;
  function getSize : TSize;
  function getWidth : LongInt;
  procedure setHeight(AValue: LongInt);
  procedure setSize(AValue: TSize);
  procedure setWidth(AValue: LongInt);
public
  Create;
  TRect.class operator =(L: TRect; R: TRect) : Boolean;
  TRect.class operator <>(L: TRect; R: TRect) : Boolean;
  TRect.class operator +(L: TRect; R: TRect) : TRect;
  TRect.class operator \*(L: TRect; R: TRect) : TRect;
  class function Empty : TRect;  Static;
  procedure NormalizeRect;
  function IsEmpty : Boolean;
  Contains;
  function IntersectsWith(R: TRect) : Boolean;
  Intersect;
  Union;
  Offset;
  SetLocation;
  Inflate;
  function CenterPoint : TPoint;
  SplitRect;
  property Height : LongInt;
  property Width : LongInt;
  property Size : TSize;
  property Location : TPoint;
case LongInt of
0: (
public
  Left : LongInt;
  Top : LongInt;
  Right : LongInt;
  Bottom : LongInt;
);
1: (
public
  TopLeft : TPoint;
  BottomRight : TPoint;
);
2: (
public
  Vector : TArray4IntegerType;
);
end

Description

TRect defines a rectangle in a discrete plane. It is described by the horizontal (left, right) or vertical (top, Bottom) positions (in pixels) of the edges, or, alternatively, by the coordinates of the top left (TopLeft) and bottom right (BottomRight) corners.

See also

Name Description
LongInt A signed 32-bits integer
LongInt A signed 32-bits integer
TPoint Point in a plane
TPoint Point in a plane
TSize Area size
TSize Area size

results matching ""

    No results matching ""