ImageEn, unit hyieutils

OrdCoords


Declaration

procedure OrdCoords(var x1, y1, x2, y2: Integer); overload;
procedure OrdCoords(var R: TRect); overload;


Description

Sorts x1, y1, x2, y2 so that x1, y1 is at the top-left and x2, y2 is at the bottom-right vertex of the rectangle.


Example

OrdCoords( Rect.Left, Rect.Top, Rect.Right, Rect.Bottom );

// Which is the same as:
OrdCoords( Rect );