RenderWare V2.1

Previous Page Index Next Page

RwUserDrawAlignmentTypes

RwGetUserDrawParentAlignment(RwUserDraw *userdraw);

Description

Retrieves the alignment flag (or flags) of the user-draw’s parent. A user-draw’s parent is either the bounding box of the clump that owns the user-draw or the current camera’s viewport.

The alignment flags of the user-draw’s parent determine which part of the user-draw’s parent rectangle is aligned with the user-draw. The actual point of alignment between a user-draw and its parent is determined by the user-draw’s alignment flags and the parent’s alignment flags.

Arguments

userdraw Pointer to the user-draw.

Return Value

A bitfield representing the set of alignment flags associated with the user-draw’s parent. Errors can be checked for using RwGetError().

Comments

If the user-draw’s type is rwBBOXALIGN then the user-draw’s parent is the bounding box of the clump to which the user-draw is attached. If the type is rwVPALIGN, the user-draw’s parent is the viewport of the current camera when the user-draw is rendered. If the user-draw’s type is rwVERTEXALIGN or rwCLUMPALIGN then the user-draw has no parent and the parent alignment flags are ignored.

The alignment flags are:

• 0 Align with the center of the parent.

• rwALIGNTOP Align with the top edge of the parent.

• rwALIGNBOTTOM Align with the bottom edge of the parent.

• rwALIGNLEFT Align with the left edge of the parent.

• rwALIGNRIGHT Align with the right edge of the parent.

See Also

RwCreateUserDraw()

RwGetUserDrawAlignment()

RwSetUserDrawAlignment()

RwSetUserDrawParentAlignment()