Table of Contents

Interface ICommandSink

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

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.

This interface corresponds to the following Direct2D interfaces: ID2D1CommandSinkID2D1CommandSink1ID2D1CommandSink2ID2D1CommandSink3ID2D1CommandSink4ID2D1CommandSink5

public interface ICommandSink : IObjectRef, IIsDisposed, IDisposable
Inherited Members
Extension Methods

Remarks

To implement this yourself, such as to process the commands stored in an ICommandList by calling Stream(ICommandSink), create a class that derives from RefTrackedObject and that also derives from this interface.

Methods

BeginDraw()
BlendImage(IDeviceImage, BlendMode, Point2Float?, in RectFloat?, InterpolationMode)
Clear(in ColorRgba128Float?)
DrawBitmap(IDeviceBitmap, in RectFloat?, float, InterpolationMode, in RectFloat?, in Matrix4x4Float?)
DrawGdiMetafile(IGdiMetafile, RectFloat, in RectFloat?)
DrawGdiMetafile(IGdiMetafile, Point2Float?)
DrawGeometry(IGeometry, IDeviceBrush, float, IStrokeStyle?)
DrawGlyphRun(Point2Float, in GlyphRun, in GlyphRunDescription, IDeviceBrush, TextMeasuringMode)
DrawGradientMesh(IGradientMesh)
DrawImage(IDeviceImage, Point2Float?, in RectFloat?, InterpolationMode, CompositeMode)
DrawInk(IDeviceInk, IDeviceBrush, IDeviceInkStyle?)
DrawLine(Point2Float, Point2Float, IDeviceBrush, float, IStrokeStyle?)
DrawRectangle(RectFloat, IDeviceBrush, float, IStrokeStyle?)
DrawSpriteBatch(ISpriteBatch, int, int, IDeviceBitmap, InterpolationMode, SpriteOptions)
EndDraw()
FillGeometry(IGeometry, IDeviceBrush, IDeviceBrush?)
FillMesh(IDeviceMesh, IDeviceBrush)
FillOpacityMask(IDeviceBitmap, IDeviceBrush, in RectFloat?, in RectFloat?)
FillRectangle(RectFloat, IDeviceBrush)
PopAxisAlignedClip()
PopLayer()
PushAxisAlignedClip(RectFloat, AntialiasMode)
PushLayer(in LayerParameters, IDeviceLayer?)
SetAntialiasMode(AntialiasMode)
SetPrimitiveBlend(PrimitiveBlend)
SetTags(ulong, ulong)
SetTextAntialiasMode(TextAntialiasMode)
SetTextRenderingParameters(ITextRenderingParameters)
SetTransform(in Matrix3x2Float)
SetUnitMode(UnitMode)