TRectEmpty (Object Pascal)

From Appmethod Code Examples
Jump to: navigation, search

Description

This example illustrates how to use Empty method to create an empty rectangle, with the upper-left corner and the lower-right corner both in the point (0, 0).

Code

uses
  System.SysUtils,
  System.Types;

var
  aRectangle : TRect;

begin
   aRectangle.Empty();
   writeln(Format('%d %d %d %d',[aRectangle.Left,aRectangle.Top,aRectangle.Right,aRectangle.Bottom]));
   //The console will output: 0 0 0 0, representing the coordinates of the corners of aRectangle

end.

Uses