MultiplyRect (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code example illustrates the usage of the MultiplyRect routine.

Code

var
  aRectangle: TRectF;
...
  { Rectangle created with coordinates: (Parameter order: Left, Top, Right, Bottom) }
  aRectangle:= TRectF.Create(2, 4, 7, 8);
  MultiplyRect(aRectangle, 1, 2);
  WriteLn(aRectangle.Left,' ',aRectangle.Top,' ',aRectangle.Right,' ',aRectangle.Bottom);
  { 
    New values of coordinates:
    Left = 2*1 ; Top = 4*2; Right = 7*1; Bottom = 8*2.
  }

Note: The coordinates of the plan start in the upper-left corner of the screen from (0,0).

Uses