RenderWare V2.1

Previous Page Index Next Page

RwUserDraw *

RwSetUserDrawParentAlignment(RwUserDraw *userdraw, RwUserDrawAlignmentTypes alignment);

Description

Sets the alignment 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.

alignment A bitfield representing an alignment flag (or "bitwise or" of flags).

Return Value

The argument userdraw if successful, and NULL otherwise.

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 bitfield is 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

RwGetUserDrawParentAlignment()

RwSetUserDrawAlignment()

RwSetUserDrawType()