Microsoft DirectX 9.0 SDK Update (October 2004)

Font.DrawText Method

Language:

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

Draws formatted text.

Overload List

public int DrawText(Sprite, string, int, int, Color);
public int DrawText(Sprite, string, int, int, int);
public int DrawText(Sprite, string, Point, Color);
public int DrawText(Sprite, string, Point, int);
public int DrawText(Sprite, string, ref Rectangle, DrawTextFormat, Color);
public int DrawText(Sprite, string, Rectangle, DrawTextFormat, Color);
public int DrawText(Sprite, string, ref Rectangle, DrawTextFormat, int);
public int DrawText(Sprite, string, Rectangle, DrawTextFormat, int);

Remarks

This method must be called from inside of a Device.BeginScene ... Device.EndScene block.

Unless the NoClip format is used, this method clips the text so that it does not appear outside of the specified rectangle. All formatting is assumed to have multiple lines unless the SingleLine format is specified.

If the selected font is too large for the rectangle, this method does not attempt to substitute a smaller font.

This method supports only fonts whose escapement and orientation are both zero.


© 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