CRenderTarget::DrawTextLayout

Draws the formatted text described by the specified IDWriteTextLayout object.

void DrawTextLayout(
   const CD2DPointF& ptOrigin,
   CD2DTextLayout* textLayout,
   CD2DBrush* pBrushForeground,
   D2D1_DRAW_TEXT_OPTIONS options = D2D1_DRAW_TEXT_OPTIONS_NONE
);

Parameters

  • ptOrigin
    The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.

  • textLayout
    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.

  • pBrushForeground
    The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect (specified by the IDWriteTextLayout::SetDrawingEffect method).

  • 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.

Requirements

Header: afxrendertarget.h

See Also

Reference

CRenderTarget Class