Unit 'Types' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#rtl]

TRect

Rectangle in a plane.

Declaration

Source position: typshrdh.inc line 104

type TRect = packed record

public

  constructor Create();

  class operator equal(TRect,TRect):Boolean();

  class operator notequal(TRect,TRect):Boolean();

  class operator add(TRect,TRect):TRect();

  class operator multiply(TRect,TRect):TRect();

  class function Empty;

  procedure NormalizeRect;

  function IsEmpty;

  function Contains();

  function IntersectsWith();

  class function Intersect();

  class function Union();

  procedure Offset();

  procedure SetLocation();

  procedure Inflate();

  function CenterPoint;

  function SplitRect();

  property Height: LongInt; [rw]

  property Width: LongInt; [rw]

  property Size: TSize; [rw]

  property Location: TPoint; [rw]

  case LongInt of

    0: (

        Left: LongInt;

  

Horizontal position of left edge.

        Top: LongInt;

  

Vertical position of top edge.

        Right: LongInt;

  

Horizontal position of right edge.

        Bottom: LongInt;

  

Vertical position of bottom edge.

      );

    1: (

        TopLeft: TPoint;

  

Position of top-left corner.

        BottomRight: TPoint;

  

Position of bottom-right corner.

      );

    2: (

        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

TPoint

  

Point in a plane.

TSize

  

Area size.


Documentation generated on: Oct 27 2024