[]
        
(Showing Draft Content)

C1.Util.DX.DirectWrite.TextLayout.Draw

Draw Method

Draw(TextRenderer, float, float)

Draws text using the specified client drawing context.

Declaration
public void Draw(TextRenderer renderer, float originX, float originY)
Parameters
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.

Remarks

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.

Draw(object, TextRenderer, float, float)

Draws text using the specified client drawing context.

Declaration
public void Draw(object clientDrawingContext, TextRenderer renderer, float originX, float originY)
Parameters
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.

Remarks

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.