IDWriteTextLayout::Draw calls this function to instruct the client to render a run of glyphs.
HRESULT DrawGlyphRun( void *clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE measuringMode, DWRITE_GLYPH_RUN const *glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const *glyphRunDescription, IUnknown *clientDrawingEffect );
The application-defined drawing context passed to IDWriteTextLayout::Draw.
The pixel location (X-coordinate) at the baseline origin of the glyph run.
The pixel location (Y-coordinate) at the baseline origin of the glyph run.
The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.
Type: const DWRITE_GLYPH_RUN*
Pointer to the glyph run instance to render.
Type: const DWRITE_GLYPH_RUN_DESCRIPTION*
A pointer to the glyph run description instance which contains properties of the characters associated with this run.
Application-defined drawing effects for the glyphs to render. Usually this argument represents effects such as the foreground brush filling the interior of text.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
|Minimum supported client||Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]|