Skip to content

Latest commit

 

History

History
131 lines (83 loc) · 6.12 KB

nf-d2d1-id2d1rendertarget-drawtext(constwchar_uint32_idwritetextformat_constd2d1_rect_f__id2d1brush_d2d1_draw_text_options_dwrite_measuring_mode).md

File metadata and controls

131 lines (83 loc) · 6.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d2d1.ID2D1RenderTarget.DrawText(constWCHAR,UINT32,IDWriteTextFormat,constD2D1_RECT_F&,ID2D1Brush,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE)
ID2D1RenderTarget::DrawText(const WCHAR,UINT32,IDWriteTextFormat,const D2D1_RECT_F &,ID2D1Brush,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE) (d2d1.h)
Draws the specified text using the format information provided by an IDWriteTextFormat object. (overload 1/2)
DrawText
DrawText method [Direct2D]
DrawText method [Direct2D]
ID2D1RenderTarget interface
ID2D1RenderTarget interface [Direct2D]
DrawText method
ID2D1RenderTarget.DrawText
ID2D1RenderTarget.DrawText(const WCHAR
UINT32
IDWriteTextFormat
const D2D1_RECT_F &
ID2D1Brush
D2D1_DRAW_TEXT_OPTIONS
DWRITE_MEASURING_MODE)
ID2D1RenderTarget::DrawText
ID2D1RenderTarget::DrawText(const WCHAR
UINT32
IDWriteTextFormat
const D2D1_RECT_F &
ID2D1Brush
D2D1_DRAW_TEXT_OPTIONS
DWRITE_MEASURING_MODE)
d2d1/ID2D1RenderTarget::DrawText
direct2d.ID2D1RenderTarget_DrawText_ptr_WCHAR_ptr_IDWriteTextFormat_ref_D2D_RECT_F_ptr_ID2D1Brush_D2D1_DRAW_TEXT_OPTIONS_DWRITE_TEXT_MEASURING_METHOD
direct2d\ID2D1RenderTarget_DrawText_ptr_WCHAR_ptr_IDWriteTextFormat_ref_D2D_RECT_F_ptr_ID2D1Brush_D2D1_DRAW_TEXT_OPTIONS_DWRITE_TEXT_MEASURING_METHOD.htm
Direct2D
226de985-0d7a-4891-83a0-b1f022ff8bd3
12/05/2018
DrawText, DrawText method [Direct2D], DrawText method [Direct2D],ID2D1RenderTarget interface, ID2D1RenderTarget interface [Direct2D],DrawText method, ID2D1RenderTarget.DrawText, ID2D1RenderTarget.DrawText(const WCHAR,UINT32,IDWriteTextFormat,const D2D1_RECT_F &,ID2D1Brush,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE), ID2D1RenderTarget::DrawText, ID2D1RenderTarget::DrawText(const WCHAR,UINT32,IDWriteTextFormat,const D2D1_RECT_F &,ID2D1Brush,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE), d2d1/ID2D1RenderTarget::DrawText, direct2d.ID2D1RenderTarget_DrawText_ptr_WCHAR_ptr_IDWriteTextFormat_ref_D2D_RECT_F_ptr_ID2D1Brush_D2D1_DRAW_TEXT_OPTIONS_DWRITE_TEXT_MEASURING_METHOD
d2d1.h
Windows
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps \| UWP apps]
D2d1.lib
D2d1.dll
Windows
19H1
ID2D1RenderTarget::DrawText
d2d1/ID2D1RenderTarget::DrawText
c++
APIRef
kbSyntax
COM
D2d1.dll
ID2D1RenderTarget.DrawText

ID2D1RenderTarget::DrawText(const WCHAR,UINT32,IDWriteTextFormat,const D2D1_RECT_F &,ID2D1Brush,D2D1_DRAW_TEXT_OPTIONS,DWRITE_MEASURING_MODE)

-description

Draws the specified text using the format information provided by an IDWriteTextFormat object.

-parameters

-param string [in]

Type: WCHAR*

A pointer to an array of Unicode characters to draw.

-param stringLength

Type: UINT

The number of characters in string.

-param textFormat [in]

Type: IDWriteTextFormat*

An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.

-param layoutRect [ref]

Type: const D2D1_RECT_F

The size and position of the area in which the text is drawn.

-param defaultFillBrush [in]

Type: ID2D1Brush*

The brush used to paint the text.

-param options

Type: D2D1_DRAW_TEXT_OPTIONS

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.

-param measuringMode

Type: DWRITE_MEASURING_MODE

A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is DWRITE_MEASURING_MODE_NATURAL.

-remarks

To create an IDWriteTextFormat object, create an IDWriteFactory and call its CreateTextFormat method.

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.

Examples

For an example, see How to: Draw Text.

-see-also

DWRITE_MEASURING_MODE

DrawTextLayout

How to: Draw Text

ID2D1RenderTarget

Text Formatting and Layout