ID2D1CommandSink interface

The command sink is implemented by you for an application when you want to receive a playback of the commands recorded in a command list. A typical usage will be for transforming the command list into another format such as XPS when some degree of conversion between the Direct2D primitives and the target format is required.

The command sink interface doesn't have any resource creation methods on it. The resources are still logically bound to the Direct2D device on which the command list was created and will be passed in to the command sink implementation.

When to implement

When the caller wishes to receive notification of the commands encapsulated in the command list.

When to use

Use to receive notification of the commands encapsulated in the command sink.

Members

The ID2D1CommandSink interface inherits from the IUnknown interface. ID2D1CommandSink also has these types of members:

Methods

The ID2D1CommandSink interface has these methods.

MethodDescription
BeginDraw

Notifies the implementation of the command sink that drawing is about to commence.

Clear

Clears the drawing area to the specified color.

DrawGeometry

Indicates the geometry to be drawn to the command sink.

DrawGlyphRun

Indicates the glyphs to be drawn.

DrawImage

Draws the provided image to the command sink.

DrawLine

Draws a line drawn between two points.

DrawRectangle

Draws a rectangle.

EndDraw

Indicates when ID2D1CommandSink processing has completed.

FillGeometry

Indicates to the command sink a geometry to be filled.

FillMesh

Indicates a mesh to be filled by the command sink.

FillOpacityMask

Fills an opacity mask on the command sink.

FillRectangle

Indicates to the command sink a rectangle to be filled.

ID2D1CommandSink::DrawBitmap

Draws a bitmap to the render target.

ID2D1CommandSink::DrawMetafile

Draw a metafile to the device context.

PopAxisAlignedClip

Removes an axis-aligned clip from the layer and clip stack.

PopLayer

Removes a layer from the layer and clip stack.

PushAxisAlignedClip

Pushes a clipping rectangle onto the clip and layer stack.

PushLayer

Pushes a layer onto the clip and layer stack.

SetAntialiasMode

Sets the antialiasing mode that will be used to render any subsequent geometry.

SetPrimitiveBlend

Sets a new primitive blend mode.

SetTags

Sets the tags that correspond to the tags in the command sink.

SetTextAntialiasMode

Indicates the new default antialiasing mode for text.

SetTextRenderingParams

Indicates more detailed text rendering parameters.

SetTransform

Sets a new transform.

SetUnitMode

The unit mode changes the meaning of subsequent units from DIPs to pixels or the other way. The command sink does not record a DPI, this is implied by the playback context or other playback interface such as ID2D1PrintControl.

 

Remarks

The ID2D1CommandSink can be implemented to receive a play-back of the commands recorded in a command list. This interface is typically used for transforming the command list into another format where some degree of conversion between the Direct2D primitives and the target format is required.

The ID2D1CommandSink interface does not have any resource creation methods. The resources are logically bound to the Direct2D device on which the ID2D1CommandList was created and will be passed in to the ID2D1CommandSink implementation.

Not all methods implemented by ID2D1DeviceContext are present.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

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

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1CommandList::Stream
ID2D1DeviceContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft