ID2D1DeviceContext4::DrawTextLayout method (d2d1_3.h)
Draws a text layout object. If the layout is not subsequently changed, this can be more efficient than DrawText when drawing the same layout repeatedly.
Syntax
void DrawTextLayout(
D2D1_POINT_2F origin,
[in] IDWriteTextLayout *textLayout,
[in, optional] ID2D1Brush *defaultFillBrush,
[in, optional] ID2D1SvgGlyphStyle *svgGlyphStyle,
UINT32 colorPaletteIndex,
D2D1_DRAW_TEXT_OPTIONS options
);
Parameters
origin
Type: D2D1_POINT_2F
The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.
[in] textLayout
Type: IDWriteTextLayout*
The formatted text to draw. Any drawing effects that do not inherit from ID2D1Resource are ignored. If there are drawing effects that inherit from ID2D1Resource that are not brushes, this method fails and the render target is put in an error state.
[in, optional] defaultFillBrush
Type: ID2D1Brush*
The brush used to paint the text.
[in, optional] svgGlyphStyle
Type: ID2D1SvgGlyphStyle*
The values for context-fill, context-stroke, and context-value that are used when rendering SVG glyphs.
colorPaletteIndex
Type: UINT32
The index used to select a color palette within a color font.
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.
Return value
None
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d2d1_3.h |
DLL | D2d1.dll |