ID2D1RenderTarget::DrawText(constWCHAR*,UINT32,IDWriteTextFormat*,constD2D1_RECT_F*,ID2D1Brush*,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE) method (d2d1.h)
Draws the specified text using the format information provided by an IDWriteTextFormat object.
void DrawText( [in] const WCHAR *string, UINT32 stringLength, [in] IDWriteTextFormat *textFormat, [in] const D2D1_RECT_F *layoutRect, [in] ID2D1Brush *defaultFillBrush, D2D1_DRAW_TEXT_OPTIONS options, DWRITE_MEASURING_MODE measuringMode );
A pointer to an array of Unicode characters to draw.
The number of characters in string.
An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.
Type: const D2D1_RECT_F*
The size and position of the area in which the text is drawn.
The brush used to paint the text.
A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is D2D1_DRAW_TEXT_OPTIONS_NONE, which indicates that text should be snapped to pixel boundaries and it should not be clipped to the layout rectangle.
A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is DWRITE_MEASURING_MODE_NATURAL.
This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawText) failed, check the result returned by the ID2D1RenderTarget::EndDraw or ID2D1RenderTarget::Flush methods.
For an example, see How to: Draw Text.
|Minimum supported client||Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]|