ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.DirectWrite Namespace / TextLayout Class / SetDrawingEffect Method / SetDrawingEffect(Object,TextRange) Method
Application-defined drawing effects that apply to the range. This data object will be passed back to the application's drawing callbacks for final rendering.
The text range to which this change applies.

In This Topic
    SetDrawingEffect(Object,TextRange) Method
    In This Topic
    Sets the application-defined drawing effect.
    Syntax
    'Declaration
     
    Public Overloads Function SetDrawingEffect( _
       ByVal drawingEffect As System.Object, _
       ByVal textRange As TextRange _
    ) As System.IntPtr
    public System.IntPtr SetDrawingEffect( 
       System.object drawingEffect,
       TextRange textRange
    )

    Parameters

    drawingEffect
    Application-defined drawing effects that apply to the range. This data object will be passed back to the application's drawing callbacks for final rendering.
    textRange
    The text range to which this change applies.

    Return Value

    If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
    Remarks
    An C1.Util.DX.Direct2D.Brush, such as a color or gradient brush, can be set as a drawing effect if you are using the RenderTarget.DrawTextLayout to draw text and that brush will be used to draw the specified range of text. This drawing effect is associated with the specified range and will be passed back to the application by way of the callback when the range is drawn at drawing time.
    See Also