Share via


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;

Parameter

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

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

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

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

  • glyphRun [in]
    Pointer to the glyph run instance to render.

  • glyphRunDescription [in]
    A pointer to the optional glyph run description instance which contains properties of the characters associated with this run.

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

Rückgabewert

Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.

Hinweise

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.

Anforderungen

Mindestens unterstützter Client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista

Mindestens unterstützter Server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008

Header

Dwrite.h

Bibliothek

Dwrite.lib

DLL

Dwrite.dll

Siehe auch

IDWriteTextRenderer