[]
        
(Showing Draft Content)

C1.Util.DX.DirectWrite.TextLayout.SetDrawingEffect

SetDrawingEffect Method

SetDrawingEffect(object, TextRange)

Sets the application-defined drawing effect.

Declaration
public IntPtr SetDrawingEffect(object drawingEffect, TextRange textRange)
Parameters
Type Name Description
object 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 textRange

The text range to which this change applies.

Returns
Type Description
IntPtr

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

An 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.

SetDrawingEffect(Brush, TextRange)

Sets the application-defined drawing effect.

Declaration
public void SetDrawingEffect(Brush brush, TextRange textRange)
Parameters
Type Name Description
Brush brush

The color or gradient brush.

TextRange textRange

The text range to which this change applies.

SetDrawingEffect(IntPtr, TextRange)

HRESULT IDWriteTextLayout::SetDrawingEffect([In] void* drawingEffect,[In] DWRITE_TEXT_RANGE textRange)

Declaration
public void SetDrawingEffect(IntPtr drawingEffect, TextRange textRange)
Parameters
Type Name Description
IntPtr drawingEffect
TextRange textRange