CenterRectCelInCRect

Centers a cel within a CRect.

Synopsis

void CenterRectCelInCRect(CCB *cel, CRect *rect)

Description

Centers a single cel over or within the specified rectangle.

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

Arguments

cel
Pointer to the cel to be centered.
rect
Pointer to a CRect within which the cel is to be centered.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, celutils.h

See Also

CenterRectCelInSRect, CenterRectAACelInCRect, CenterRectCelListInCRect