title | description | ms.assetid | keywords | topic_type | api_location | api_type | ms.topic | ms.date | api_name | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ID2D1RenderTarget DrawText methods |
Draws the specified text using the format information provided by an IDWriteTextFormat object. |
7cda7854-f9df-48d3-bc62-6aaee769e6f9 |
|
|
|
|
reference |
05/31/2018 |
Draws the specified text using the format information provided by an IDWriteTextFormat object.
Method | Description |
---|---|
DrawText(WCHAR*,IDWriteTextFormat*,D2D1_RECT_F&,ID2D1Brush*,D2D1_DRAW_TEXT_OPTIONS,DWRITE_TEXT_MEASURING_METHOD) | Draws the specified text using the format information provided by an IDWriteTextFormat object. |
DrawText(WCHAR*,IDWriteTextFormat*,D2D1_RECT_F*,ID2D1Brush*,D2D1_DRAW_TEXT_OPTIONS,DWRITE_TEXT_MEASURING_METHOD) | Draws the specified text using the format information provided by an IDWriteTextFormat object. |
To draw text with Direct2D, use the ID2D1RenderTarget::DrawText method for text that has a single format, or the ID2D1RenderTarget::DrawTextLayout method when you need multiple formats, advanced OpenType features, or hit testing. These methods use the DirectWrite API to provide high-quality text display.
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.
Requirement | Value |
---|---|
Library |
|
DLL |
|