[]
Sets the application-defined drawing effect.
public IntPtr SetDrawingEffect(object drawingEffect, TextRange textRange)
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. |
Type | Description |
---|---|
IntPtr | If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. |
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.
Sets the application-defined drawing effect.
public void SetDrawingEffect(Brush brush, TextRange textRange)
Type | Name | Description |
---|---|---|
Brush | brush | The color or gradient brush. |
TextRange | textRange | The text range to which this change applies. |
HRESULT IDWriteTextLayout::SetDrawingEffect([In] void* drawingEffect,[In] DWRITE_TEXT_RANGE textRange)
public void SetDrawingEffect(IntPtr drawingEffect, TextRange textRange)
Type | Name | Description |
---|---|---|
IntPtr | drawingEffect | |
TextRange | textRange |