IDWriteBitmapRenderTarget3::DrawGlyphRunWithColorSupport method (dwrite_3.h)

Draws a glyph run, using color representations of glyphs if available in the font.

Syntax

HRESULT DrawGlyphRunWithColorSupport(
  FLOAT                  baselineOriginX,
  FLOAT                  baselineOriginY,
  DWRITE_MEASURING_MODE  measuringMode,
  DWRITE_GLYPH_RUN const *glyphRun,
  IDWriteRenderingParams *renderingParams,
  COLORREF               textColor,
  UINT32                 colorPaletteIndex,
  RECT                   *blackBoxRect
);

Parameters

baselineOriginX

Type: FLOAT

X-coordinate of the baseline.

baselineOriginY

Type: FLOAT

Y-coordinate of the baseline.

measuringMode

Type: DWRITE_MEASURING_MODE

Specifies measuring mode for positioning glyphs in the run.

glyphRun

Type: _In_ DWRITE_GLYPH_RUN const*

The glyph run to draw.

renderingParams

Type: _In_ IDWriteRenderingParams *

Object that controls rendering behavior.

textColor

Type: COLORREF

Foreground color of the text.

colorPaletteIndex

Type: UINT32

Zero-based index of the font-defined color palette to use.

blackBoxRect

Type: _Out_opt_ RECT *

Optional rectangle that receives the bounding box (in pixels, not DIPs) of all the pixels affected by drawing the glyph run. The black box rectangle might extend beyond the dimensions of the bitmap.

Return value

A standard HRESULT error code.

Remarks

This method internally calls TranslateColorGlyphRun, and then automatically calls the appropriate lower-level methods to render monochrome or color glyph runs.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 (with Windows App SDK 1.2 or later)
Header dwrite_3.h