IDWritePaintReader::SetCurrentGlyph(UINT32,DWRITE_PAINT_ELEMENT*,UINT32,D2D_RECT_F*,DWRITE_PAINT_ATTRIBUTES*) method (dwrite_3.h)
Sets the current glyph, and positions the reader on the root paint element of the selected glyph's visual tree.
Syntax
HRESULT SetCurrentGlyph(
UINT32 glyphIndex,
DWRITE_PAINT_ELEMENT *paintElement,
UINT32 structSize,
D2D_RECT_F *clipBox,
DWRITE_PAINT_ATTRIBUTES *glyphAttributes
);
Parameters
glyphIndex
Type: UINT32
Glyph index to get the color glyph representation for.
paintElement
Type: _Out_writes_bytes_(structSize) DWRITE_PAINT_ELEMENT *
Receives information about the root paint element of the glyph's visual tree.
structSize
Type: UINT32
Size of the DWRITE_PAINT_ELEMENT structure, in bytes.
clipBox
Type: _Out_ D2D_RECT_F *
Receives a precomputed glyph box (in ems) for the specified glyph, if one is specified by the font. Otherwise, the glyph box is set to an empty rectangle (all zeros). If a non-empty clip box is specified, then you must clip the color glyph's representation to the specified box.
glyphAttributes
Type: _Out_opt_ DWRITE_PAINT_ATTRIBUTES * = nullptr
Receives optional paint attributes for the glyph.
Return value
A standard HRESULT error code.
Remarks
If the specified glyph index isn't a color glyph, then the method succeeds, but the paintType member of the DWRITE_PAINT_ELEMENT structure is set to DWRITE_PAINT_TYPE_NONE. In that case, you should draw the input glyph as a non-color glyph.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1809 (with Windows App SDK 1.2 or later) |
Header | dwrite_3.h |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for