[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Objects' (#rtl)

TRect.Copy

Copy cornerpoints from another rectangle.

Declaration

Source position: objects.pp line 238

procedure TRect.Copy(

  R: TRect

);

Description

Assigns the rectangle R to the object. After the call to Copy, the rectangle R has been copied to the object that invoked Copy.

Errors

None.

See also

TRect.Assign

  

Set rectangle corners.

Example

Program ex2;

{ Program to demonstrate TRect.Copy }

Uses objects;

Var ARect,BRect,CRect : TRect;

begin
  ARect.Assign(10,10,20,20);
  BRect.Assign(15,15,25,25);
  CRect.Copy(ARect);
  If ARect.Equals(CRect) Then
    Writeln ('ARect equals CRect')
  Else
    Writeln ('ARect does not equal CRect !');
end.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.