[]
Draws text using the specified client drawing context.
public void Draw(TextRenderer renderer, float originX, float originY)
Type | Name | Description |
---|---|---|
TextRenderer | renderer | Pointer to the set of callback functions used to draw parts of a text string. |
float | originX | The x-coordinate of the layout's left side. |
float | originY | The y-coordinate of the layout's top side. |
To draw text with this method, a textLayout object needs to be created by the application using CreateTextLayout(string, int, TextFormat, float, float). 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.
Draws text using the specified client drawing context.
public void Draw(object clientDrawingContext, TextRenderer renderer, float originX, float originY)
Type | Name | Description |
---|---|---|
object | clientDrawingContext | An application-defined drawing context. |
TextRenderer | renderer | Pointer to the set of callback functions used to draw parts of a text string. |
float | originX | The x-coordinate of the layout's left side. |
float | originY | The y-coordinate of the layout's top side. |
To draw text with this method, a textLayout object needs to be created by the application using CreateTextLayout(string, int, TextFormat, float, float). 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.