ID2D1CommandSink::DrawGlyphRun method

Indicates the glyphs to be drawn.

Syntax


HRESULT DrawGlyphRun(
                       D2D1_POINT_2F                baselineOrigin,
  [in]           const DWRITE_GLYPH_RUN             *glyphRun,
  [in, optional] const DWRITE_GLYPH_RUN_DESCRIPTION *glyphRunDescription,
  [in]                 ID2D1Brush                   *foregroundBrush,
                       DWRITE_MEASURING_MODE        measuringMode
);

Parameters

baselineOrigin

Type: D2D1_POINT_2F

The upper left corner of the baseline.

glyphRun [in]

Type: const DWRITE_GLYPH_RUN*

The glyphs to render.

glyphRunDescription [in, optional]

Type: const DWRITE_GLYPH_RUN_DESCRIPTION*

Additional non-rendering information about the glyphs.

foregroundBrush [in]

Type: ID2D1Brush*

The brush used to fill the glyphs.

measuringMode

Type: DWRITE_MEASURING_MODE

The measuring mode to apply to the glyphs.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

DrawText and DrawTextLayout are broken down into glyph runs and rectangles by the time the command sink is processed. So, these methods aren't available on the command sink. Since the application may require additional callback processing when calling DrawTextLayout, this semantic can't be easily preserved in the command list.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1CommandSink
ID2D1CommandList::Stream
ID2D1DeviceContext::DrawGlyphRun

 

 

Show: