Vizard 8 » Command Index » Vizard objects » node3d » <node3d:text3d>.alignment
8.0

<node3d:text3d>.alignment

This action sets the alignment of the text object

<node3d:text3d>.alignment(  
alignment  
)  
alignment
The alignment mode for the text object.

Remarks

Align can be one of the following values:

Alignment Modes

viz.ALIGN_LEFT_TOP

Text is aligned with upper left corner

viz.ALIGN_LEFT_CENTER

Text is aligned with center left side

viz.ALIGN_LEFT_BOTTOM

Text is aligned with bottom left corner

viz.ALIGN_CENTER_TOP

Text is aligned with center top side

viz.ALIGN_CENTER_CENTER

Text is aligned with center

viz.ALIGN_CENTER_BOTTOM

Text is aligned with center bottom side

viz.ALIGN_RIGHT_TOP

Text is aligned with upper right corner

viz.ALIGN_RIGHT_CENTER

Text is aligned with center right side

viz.ALIGN_RIGHT_BOTTOM

Text is aligned with bottom right corner

viz.ALIGN_LEFT_BASE

Text is aligned with left base of first line

viz.ALIGN_CENTER_BASE

Text is aligned with center base of first line

viz.ALIGN_RIGHT_BASE

Text is aligned with right base of first line

viz.ALIGN_LEFT_BOTTOM_BASE

Text is aligned with left base of last line

viz.ALIGN_CENTER_BOTTOM_BASE

Text is aligned with center base of last line

viz.ALIGN_RIGHT_BOTTOM_BASE

Text is aligned with right base of last line

Return Value

None

Example

text = viz.addText('Vizard')
text.alignment(viz.ALIGN_LEFT_TOP)
text.setPosition([2,4,0]) # The upper left corner of the text object will be at [2,4,0].