CenterRectCelListInDisplay

Centers a list of cels in the display.

Synopsis

void CenterRectCelListInDisplay(CCB *cel)

Description

Centers a list of one or more cels over or within the display. The list of cels is treated as if it were a single logical entity. The first cel in the list is centered, then the X/Y coordinates of all remaining cels in the list are modified so that all cels maintain their original positional relationships. This is especially useful when the first cel in the list encompasses the area occupied by all the other cels; the effect is to center the group of cels as if they were all one cel.

The display is assumed to be 320 x 240.

The ccb_XPos and ccb_YPos fields are modified in the CCBs; other CCB fields are not modified. The centering is based on the first cel's projected size, not its source data size. If the first cel is projected to a non-rectangular shape, the result is invalid.

Arguments

cel
Pointer to a list of one or more cels to be centered.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, celutils.h

See Also

CenterRectAACelInDisplay, CenterRectCelInDisplay