Image Manager (CVCImg.dll) 15.0
TDRect Struct Reference

Double precision rectangle defined by its edges. More...

Data Fields

double Bottom
 Bottom edge of the rectangle (inclusive).
 
double Left
 Left edge of the rectangle.
 
double Right
 Right edge of the rectangle (inclusive).
 
double Top
 Top edge of the rectangle.
 

Detailed Description

Double precision rectangle defined by its edges.

The edges of the rectangle are always parallel to the image borders:

Normally the four edges are given in pixel coordinates which have a fixed coordinate system with its origin at the left/top border of the image and no scaling or rotation.

Thus most functions using TDRect do not use the image's coordinate system.

The four vertices are (Left, Top), (Right, Top), (Right, Bottom), and (Left, Bottom).

Note
The line segments [(Left, Top) (Right, Top)] and [(Left, Top) (Left, Bottom)] are inclusive. This means that the Right and Bottom edges are considered to be inside the rectangle. Width and height are:
width = Right - Left + 1
height = Bottom - Top + 1
Attention
Empty rectangles have a width and height of zero:
Left = 0, Top = 0
Right = -1, Bottom = -1
See also
TCoordinateMap for information on the coordinate systems; TArea.