Interface CommandSink
[Guid("54d7898a-a061-40a7-bec7-e465bcba2c4f")]
public interface CommandSink : IUnknown, ICallbackable, IDisposable
- Inherited Members
Properties
AntialiasMode
Sets the antialias mode.
AntialiasMode AntialiasMode { set; }
Property Value
PrimitiveBlend
Sets the blending for primitives.
PrimitiveBlend PrimitiveBlend { set; }
Property Value
TextAntialiasMode
Sets the text antialias mode.
TextAntialiasMode TextAntialiasMode { set; }
Property Value
TextRenderingParams
Sets the parameters for text rendering.
RenderingParams TextRenderingParams { set; }
Property Value
Transform
Sets the matrix transform.
RawMatrix3x2 Transform { set; }
Property Value
- RawMatrix3x2
Remarks
The transform will be applied to the corresponding device context.
UnitMode
Sets the unit mode
UnitMode UnitMode { set; }
Property Value
Methods
BeginDraw()
Begins a draw sequence.
void BeginDraw()
Clear(RawColor4?)
[This documentation is preliminary and is subject to change.]
void Clear(RawColor4? color = null)
Parameters
color
RawColor4?The color to which the command sink should be cleared.
Remarks
The clear color is restricted by the currently selected clip and layer bounds.If no color is specified, the color should be interpreted by context. Examples include but are not limited to:Transparent black for a premultiplied bitmap target. Opaque black for an ignore bitmap target. Containing no content (or white) for a printer page.
DrawBitmap(Bitmap, RawRectangleF?, float, InterpolationMode, RawRectangleF?, RawMatrix?)
No documentation.
void DrawBitmap(Bitmap bitmap, RawRectangleF? destinationRectangle, float opacity, InterpolationMode interpolationMode, RawRectangleF? sourceRectangle, RawMatrix? erspectiveTransformRef)
Parameters
bitmap
BitmapNo documentation.
destinationRectangle
RawRectangleF?No documentation.
opacity
floatNo documentation.
interpolationMode
InterpolationModeNo documentation.
sourceRectangle
RawRectangleF?No documentation.
erspectiveTransformRef
RawMatrix?No documentation.
DrawGdiMetafile(GdiMetafile, RawVector2?)
No documentation.
void DrawGdiMetafile(GdiMetafile gdiMetafile, RawVector2? targetOffset)
Parameters
gdiMetafile
GdiMetafileNo documentation.
targetOffset
RawVector2?No documentation.
DrawGeometry(Geometry, Brush, float, StrokeStyle)
[This documentation is preliminary and is subject to change.]
void DrawGeometry(Geometry geometry, Brush brush, float strokeWidth, StrokeStyle strokeStyle)
Parameters
geometry
GeometryThe geometry to be stroked.
brush
BrushThe brush that will be used to fill the stroked geometry.
strokeWidth
floatThe width of the stroke.
strokeStyle
StrokeStyleThe style of the stroke.
Remarks
You must convert ellipses and rounded rectangles to the corresponding ellipse and rounded rectangle geometries before calling into the DrawGeometry method.Additional ReferencesID2D1CommandList::Stream, DrawGeometry(Geometry, Brush)RequirementsMinimum supported operating systemSame as Interface / Class Highest IRQL levelN/A (user mode) Callable from DlllMain()No Callable from services and session 0Yes Callable from UI threadYes?
DrawGlyphRun(RawVector2, GlyphRun, GlyphRunDescription, Brush, MeasuringMode)
[This documentation is preliminary and is subject to change.]
void DrawGlyphRun(RawVector2 baselineOrigin, GlyphRun glyphRun, GlyphRunDescription glyphRunDescription, Brush foregroundBrush, MeasuringMode measuringMode)
Parameters
baselineOrigin
RawVector2The sequence of glyphs to be sent.
glyphRun
GlyphRunAdditional non-rendering information about the glyphs.
glyphRunDescription
GlyphRunDescriptionThe brush used to fill the glyphs.
foregroundBrush
BrushThe measuring mode to apply to the glyphs.
measuringMode
MeasuringModeNo documentation.
DrawImage(Image, RawVector2?, RawRectangleF?, InterpolationMode, CompositeMode)
[This documentation is preliminary and is subject to change.]
void DrawImage(Image image, RawVector2? targetOffset, RawRectangleF? imageRectangle, InterpolationMode interpolationMode, CompositeMode compositeMode)
Parameters
image
ImageThe image to be drawn to the command sink.
targetOffset
RawVector2?This defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image will be rendered to the corresponding destination. If not specified, the destination origin will be (0, 0). The top-left corner of the image will be mapped to the target offset. This will not necessarily be the origin.
imageRectangle
RawRectangleF?The corresponding rectangle in the image space will be mapped to the provided origins when processing the image.
interpolationMode
InterpolationModeThe interpolation mode that will be used to scale the image if necessary.
compositeMode
CompositeModeIf specified, the composite mode that will be applied to the limits of the currently selected clip.
Remarks
Because the image can itself be a command list or contain an effect graph that in turn contains a command list, this method can result in recursive processing.
DrawLine(RawVector2, RawVector2, Brush, float, StrokeStyle)
[This documentation is preliminary and is subject to change.]
void DrawLine(RawVector2 point0, RawVector2 point1, Brush brush, float strokeWidth, StrokeStyle strokeStyle)
Parameters
point0
RawVector2The start point of the line.
point1
RawVector2The end point of the line.
brush
BrushThe brush used to fill the line.
strokeWidth
floatThe width of the stroke to fill the line.
strokeStyle
StrokeStyleThe style of the stroke. If not specified, the stroke is solid.
Remarks
Additional References
DrawRectangle(RawRectangleF, Brush, float, StrokeStyle)
No documentation.
void DrawRectangle(RawRectangleF rect, Brush brush, float strokeWidth, StrokeStyle strokeStyle)
Parameters
rect
RawRectangleFNo documentation.
brush
BrushNo documentation.
strokeWidth
floatNo documentation.
strokeStyle
StrokeStyleNo documentation.
EndDraw()
Ends a draw sequence.
void EndDraw()
FillGeometry(Geometry, Brush, Brush)
[This documentation is preliminary and is subject to change.]
void FillGeometry(Geometry geometry, Brush brush, Brush opacityBrush)
Parameters
geometry
GeometryThe geometry that should be filled.
brush
BrushThe primary brush used to fill the geometry.
opacityBrush
BrushA brush whose alpha channel is used to modify the opacity of the primary fill brush.
Remarks
If the opacity brush is specified, the primary brush will be a bitmap brush fixed on both the x-axis and the y-axis.Ellipses and rounded rectangles are converted to the corresponding geometry before being passed to FillGeometry.
FillMesh(Mesh, Brush)
[This documentation is preliminary and is subject to change.]
void FillMesh(Mesh mesh, Brush brush)
Parameters
FillOpacityMask(Bitmap, Brush, RawRectangleF?, RawRectangleF?)
[This documentation is preliminary and is subject to change.]
void FillOpacityMask(Bitmap opacityMask, Brush brush, RawRectangleF? destinationRectangle, RawRectangleF? sourceRectangle)
Parameters
opacityMask
BitmapThe bitmap whose alpha channel will be sampled to define the opacity mask.
brush
BrushThe brush with which to fill the mask.
destinationRectangle
RawRectangleF?The type of content that the mask represents.
sourceRectangle
RawRectangleF?The destination rectangle in which to fill the mask. If not specified, this is the origin.
Remarks
The opacity mask bitmap must be considered to be clamped on each axis.
FillRectangle(RawRectangleF, Brush)
[This documentation is preliminary and is subject to change.]
void FillRectangle(RawRectangleF rect, Brush brush)
Parameters
rect
RawRectangleFThe rectangle to fill.
brush
BrushThe brush with which to fill the rectangle.
PopAxisAlignedClip()
[This documentation is preliminary and is subject to change.]
void PopAxisAlignedClip()
PopLayer()
No documentation.
void PopLayer()
PushAxisAlignedClip(RawRectangleF, AntialiasMode)
[This documentation is preliminary and is subject to change.]
void PushAxisAlignedClip(RawRectangleF clipRect, AntialiasMode antialiasMode)
Parameters
clipRect
RawRectangleFThe rectangle that defines the clip.
antialiasMode
AntialiasModeWhether the given clip should be antialiased.
Remarks
If the current world transform is not preserving the axis, clipRectangle is transformed and the bounds of the transformed rectangle are used instead.
PushLayer(ref LayerParameters1, Layer)
No documentation.
void PushLayer(ref LayerParameters1 layerParameters1, Layer layer)
Parameters
layerParameters1
LayerParameters1No documentation.
layer
LayerNo documentation.
SetTags(long, long)
Sets tags.
void SetTags(long tag1, long tag2)