Microsoft DirectX 9.0 SDK Update (October 2004)

DrawTextFormat Enumeration

Language:

Note: This documentation is preliminary and is subject to change.

Specifies the method of formatting text.

Definition

Visual Basic .NET Public Enum DrawTextFormat
C# public enum DrawTextFormat
Managed C++ __value public enum DrawTextFormat
JScript .NET public enum DrawTextFormat

Members

Member Value Description
Top 0 Top-justifies text (on a single line only).
Right 2 Aligns text to right.
Left 0 Aligns text to left.
Bottom 8 Justifies text to the bottom of the rectangle. This value must be combined with SingleLine.
WordBreak 16 Breaks words. Lines are automatically broken between words if a word extends past the edge of the rectangle specified by the rect parameter. A carriage return/line feed sequence also breaks the line.
VerticalCenter 4 Centers text vertically (on a single line only).
SingleLine 32 Displays text on a single line only. Carriage returns and line feeds do not break the line.
RightToLeftReading 131072 Displays text in right-to-left reading order for bidirectional text when a Hebrew or Arabic font is selected. The default reading order for all text is left-to-right.
NoClip 256 Draws without clipping. Font.DrawText is somewhat faster when NoClip is used.
ExpandTabs 64 Expands tab characters. The default number of characters per tab is eight. The PathEllipsis and EndEllipsis values cannot be used with the ExpandTabs value.
Center 1 Centers text horizontally in the rectangle.
CalculateRect 1024 Determines the width and height of the rectangle. If there are multiple lines of text, Font.DrawText uses the width of the rectangle specified by the rect parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, Font.DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, Font.DrawText returns the height of the formatted text but does not draw the text.
None 0 Specifies no formatting.

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3DX (microsoft.directx.direct3dx.dll)
Strong Name Microsoft.DirectX.Direct3DX,  Version=1.0.2902.0,  Culture=neutral,  PublicKeyToken=31bf3856ad364e35

© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center