Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IDWriteInlineObject::Draw method

The application implemented rendering callback (IDWriteTextRenderer::DrawInlineObject) can use this to draw the inline object without needing to cast or query the object type. The text layout does not call this method directly.

Syntax


virtual HRESULT Draw(
   void                * clientDrawingContext,
   IDWriteTextRenderer * renderer,
   FLOAT                originX,
   FLOAT                originY,
   BOOL                 isSideways,
   BOOL                 isRightToLeft,
   IUnknown            * clientDrawingEffect
) = 0;

Parameters

clientDrawingContext

Type: void*

The drawing context passed to IDWriteTextLayout::Draw. This parameter may be NULL.

renderer

Type: IDWriteTextRenderer*

The same renderer passed to IDWriteTextLayout::Draw as the object's containing parent. This is useful if the inline object is recursive such as a nested layout.

originX

Type: FLOAT

The x-coordinate at the upper-left corner of the inline object.

originY

Type: FLOAT

The y-coordinate at the upper-left corner of the inline object.

isSideways

Type: BOOL

A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.

isRightToLeft

Type: BOOL

A Boolean flag that indicates whether the object is in a right-to-left context and should be drawn flipped.

clientDrawingEffect

Type: IUnknown*

The drawing effect set in IDWriteTextLayout::SetDrawingEffect. Usually this effect is a foreground brush that is used in glyph drawing.

Return value

Type: HRESULT

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

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

IDWriteInlineObject

 

 

Community Additions

ADD
Show:
© 2015 Microsoft