Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDWriteTextLayout::SetDrawingEffect method

Sets the application-defined drawing effect.

Syntax


virtual HRESULT SetDrawingEffect(
  IUnknown * drawingEffect,
  DWRITE_TEXT_RANGE  textRange
) = 0;

Parameters

drawingEffect

Type: IUnknown*

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

Type: DWRITE_TEXT_RANGE

The text range to which this change applies.

Return value

Type: HRESULT

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

Remarks

An ID2D1Brush, such as a color or gradient brush, can be set as a drawing effect if you are using the ID2D1RenderTarget::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.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite.h

Library

Dwrite.lib

DLL

Dwrite.dll

See also

IDWriteTextLayout

 

 

Community Additions

Show:
© 2014 Microsoft