Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDWriteTextRenderer::DrawGlyphRun method

IDWriteTextLayout::Draw calls this function to instruct the client to render a run of glyphs.

Syntax


virtual HRESULT DrawGlyphRun(
  void * clientDrawingContext,
  FLOAT  baselineOriginX,
  FLOAT  baselineOriginY,
  DWRITE_MEASURING_MODE  measuringMode,
  [in]  const DWRITE_GLYPH_RUN * glyphRun,
  [in]  const DWRITE_GLYPH_RUN_DESCRIPTION * glyphRunDescription,
  IUnknown * clientDrawingEffect
) = 0;

Parameters

clientDrawingContext

Type: void*

The application-defined drawing context passed to IDWriteTextLayout::Draw.

baselineOriginX

Type: FLOAT

The pixel location (X-coordinate) at the baseline origin of the glyph run.

baselineOriginY

Type: FLOAT

The pixel location (Y-coordinate) at the baseline origin of the glyph run.

measuringMode

Type: DWRITE_MEASURING_MODE

The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.

glyphRun [in]

Type: const DWRITE_GLYPH_RUN*

Pointer to the glyph run instance to render.

glyphRunDescription [in]

Type: const DWRITE_GLYPH_RUN_DESCRIPTION*

A pointer to the glyph run description instance which contains properties of the characters associated with this run.

clientDrawingEffect

Type: IUnknown*

Application-defined drawing effects for the glyphs to render. Usually this argument represents effects such as the foreground brush filling the interior of text.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The IDWriteTextLayout::Draw function calls this callback function with all the information about glyphs to render. The application implements this callback by mostly delegating the call to the underlying platform's graphics API such as Direct2D to draw glyphs on the drawing context. An application that uses GDI can implement this callback in terms of the IDWriteBitmapRenderTarget::DrawGlyphRun method.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Dwrite.h

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteTextRenderer

 

 

Community Additions

Show:
© 2014 Microsoft. All rights reserved.