ComponentOne Bitmap for WPF
C1.WPF.DX.4.5.2 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 Object, _
       ByVal textRange As TextRange _
    ) As IntPtr
    public IntPtr SetDrawingEffect( 
       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