PointToBox

From SCAR Divi Manual
Revision as of 14:52, 2 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function PointToBox(p1, p2: TPoint): TBox; </source> ==Availability== SCAR Divi 3.26 > Current ===Aliases=== *IntToBox (SCAR D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function PointToBox(p1, p2: TPoint): TBox;

Availability

SCAR Divi 3.26 > Current

Aliases

  • IntToBox (SCAR Divi 3.00 > Current)

Description

Initializes a TBox with the given coordinates p1 and p2 which form the upper-left corner and bottom-right corner of the box defined by the TBox.

Example

var
  b: TBox;

begin
  b := PointToBox(Point(1, 2), Point(3, 4));
  WriteLn('TBox(' + IntToStr(b.x1) + ',' + IntToStr(b.y1) + ',' +
    IntToStr(b.x2) + ',' + IntToStr(b.y2) + ')');
end.

Output:

TBox(1,2,3,4)

See Also