This topic provides an introduction to the TPoint
, TSize
, TRect
and TRegion
basic graphics classes.
A TPoint
stores and provides the means for manipulating conceptual points and sizes. It consists of a pair of (x,y) co-ordinates.
A TSize
is described in terms of a width and height.
A TRect
represents a rectangle whose sides are parallel with the axes of the co-ordinate system. It is described by the co-ordinates of its top left and bottom right corners, or by its top left hand corner and its size.
A TRegion
consists of one or more TRect
s. All Draw()
functions draw to a TRect
rather than to a TRegion
because calculating the dimensions of a TRegion
is too complex for the requirements of most applications. TRegion
s are principally used when drawing sprites.
The classes: RRegion
, RRegionBuf<class S>
and TRegionFix<class S>
all derive from TRegion
.