ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.DirectWrite Namespace / TextLayout Class / Draw Method / Draw(Object,TextRenderer,Single,Single) Method
An application-defined drawing context.
Pointer to the set of callback functions used to draw parts of a text string.
The x-coordinate of the layout's left side.
The y-coordinate of the layout's top side.

In This Topic
    Draw(Object,TextRenderer,Single,Single) Method
    In This Topic
    Draws text using the specified client drawing context.
    Syntax
    'Declaration
     
    Public Overloads Sub Draw( _
       ByVal clientDrawingContext As System.Object, _
       ByVal renderer As TextRenderer, _
       ByVal originX As System.Single, _
       ByVal originY As System.Single _
    ) 
    public void Draw( 
       System.object clientDrawingContext,
       TextRenderer renderer,
       System.float originX,
       System.float originY
    )

    Parameters

    clientDrawingContext
    An application-defined drawing context.
    renderer
    Pointer to the set of callback functions used to draw parts of a text string.
    originX
    The x-coordinate of the layout's left side.
    originY
    The y-coordinate of the layout's top side.

    Return Value

    If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
    Remarks
    To draw text with this method, a textLayout object needs to be created by the application using Factory.CreateTextLayout. 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.
    See Also