IDWriteTextLayout::Draw Method

Draws text using the specified client drawing context.

Syntax

virtual HRESULT Draw(
  void * clientDrawingContext,
  IDWriteTextRenderer * renderer,
  FLOAT  originX,
  FLOAT  originY
) = 0;

Parameter

  • clientDrawingContext
    An application-defined drawing context.

  • renderer
    Pointer to the set of callback functions used to draw parts of a text string.

  • originX
    The x-coordinate of the layout's left side.

  • originY
    The y-coordinate of the layout's top side.

Rückgabewert

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

Hinweise

To draw text with this method, a textLayout object needs to be created by the application using IDWriteFactory::CreateTextLayout.

After the textLayout object is obtained, the application calls the IDWriteTextLayout::Draw method to draw the text, decorations, and inline objects. The actual drawing is done through the callback interface passed in as the textRenderer argument; there, the corresponding DrawGlyphRun API is called.

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

IDWriteTextLayout