Skip to content

TRect.Copy

Copy cornerpoints from another rectangle.

Declaration

Source position: objects.pp line 273

default 
  procedure 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

Name Description
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.