// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using SharpDX.Mathematics.Interop; namespace SharpDX.Direct2D1 { public partial interface CommandSink { /// /// Begins a draw sequence. /// /// HRESULT ID2D1CommandSink::BeginDraw() void BeginDraw(); /// /// Ends a draw sequence. /// /// HRESULT ID2D1CommandSink::EndDraw() void EndDraw(); /// /// Sets the antialias mode. /// /// HRESULT ID2D1CommandSink::SetAntialiasMode([In] D2D1_ANTIALIAS_MODE antialiasMode) SharpDX.Direct2D1.AntialiasMode AntialiasMode { set; } /// /// Sets tags. /// /// HRESULT ID2D1CommandSink::SetTags([In] unsigned longlong tag1,[In] unsigned longlong tag2) void SetTags(long tag1, long tag2); /// /// Sets the text antialias mode. /// /// HRESULT ID2D1CommandSink::SetTextAntialiasMode([In] D2D1_TEXT_ANTIALIAS_MODE textAntialiasMode) SharpDX.Direct2D1.TextAntialiasMode TextAntialiasMode { set; } /// /// Sets the parameters for text rendering. /// /// HRESULT ID2D1CommandSink::SetTextRenderingParams([In, Optional] IDWriteRenderingParams* textRenderingParams) SharpDX.DirectWrite.RenderingParams TextRenderingParams { set; } /// /// Sets the matrix transform. /// /// /// The transform will be applied to the corresponding device context. /// /// HRESULT ID2D1CommandSink::SetTransform([In] const D2D_MATRIX_3X2_F* transform) RawMatrix3x2 Transform { set; } /// /// Sets the blending for primitives. /// /// HRESULT ID2D1CommandSink::SetPrimitiveBlend([In] D2D1_PRIMITIVE_BLEND primitiveBlend) SharpDX.Direct2D1.PrimitiveBlend PrimitiveBlend { set; } /// /// Sets the unit mode /// /// HRESULT ID2D1CommandSink::SetUnitMode([In] D2D1_UNIT_MODE unitMode) SharpDX.Direct2D1.UnitMode UnitMode { set; } /// /// [This documentation is preliminary and is subject to change.] /// /// The color to which the command sink should be cleared. /// /// 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. /// /// HRESULT ID2D1CommandSink::Clear([In, Optional] const D2D_COLOR_F* color) void Clear(RawColor4? color = null); /// /// [This documentation is preliminary and is subject to change.] /// /// The sequence of glyphs to be sent. /// Additional non-rendering information about the glyphs. /// The brush used to fill the glyphs. /// The measuring mode to apply to the glyphs. /// No documentation. /// HRESULT ID2D1CommandSink::DrawGlyphRun([In] D2D_POINT_2F baselineOrigin,[In] const DWRITE_GLYPH_RUN* glyphRun,[In, Optional] const DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription,[In] ID2D1Brush* foregroundBrush,[In] DWRITE_MEASURING_MODE measuringMode) void DrawGlyphRun(RawVector2 baselineOrigin, SharpDX.DirectWrite.GlyphRun glyphRun, SharpDX.DirectWrite.GlyphRunDescription glyphRunDescription, SharpDX.Direct2D1.Brush foregroundBrush, SharpDX.Direct2D1.MeasuringMode measuringMode); /// /// [This documentation is preliminary and is subject to change.] /// /// The start point of the line. /// The end point of the line. /// The brush used to fill the line. /// The width of the stroke to fill the line. /// The style of the stroke. If not specified, the stroke is solid. /// /// Additional References /// /// HRESULT ID2D1CommandSink::DrawLine([In] D2D_POINT_2F point0,[In] D2D_POINT_2F point1,[In] ID2D1Brush* brush,[In] float strokeWidth,[In, Optional] ID2D1StrokeStyle* strokeStyle) void DrawLine(RawVector2 point0, RawVector2 point1, SharpDX.Direct2D1.Brush brush, float strokeWidth, SharpDX.Direct2D1.StrokeStyle strokeStyle); /// /// [This documentation is preliminary and is subject to change.] /// /// The geometry to be stroked. /// The brush that will be used to fill the stroked geometry. /// The width of the stroke. /// The style of the stroke. /// /// You must convert ellipses and rounded rectangles to the corresponding ellipse and rounded rectangle geometries before calling into the DrawGeometry method.Additional ReferencesID2D1CommandList::Stream, 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? /// /// HRESULT ID2D1CommandSink::DrawGeometry([In] ID2D1Geometry* geometry,[In] ID2D1Brush* brush,[In] float strokeWidth,[In, Optional] ID2D1StrokeStyle* strokeStyle) void DrawGeometry(SharpDX.Direct2D1.Geometry geometry, SharpDX.Direct2D1.Brush brush, float strokeWidth, SharpDX.Direct2D1.StrokeStyle strokeStyle); /// /// No documentation. /// /// No documentation. /// No documentation. /// No documentation. /// No documentation. /// HRESULT ID2D1CommandSink::DrawRectangle([In] const D2D_RECT_F* rect,[In] ID2D1Brush* brush,[In] float strokeWidth,[In, Optional] ID2D1StrokeStyle* strokeStyle) void DrawRectangle(RawRectangleF rect, SharpDX.Direct2D1.Brush brush, float strokeWidth, SharpDX.Direct2D1.StrokeStyle strokeStyle); /// /// No documentation. /// /// No documentation. /// No documentation. /// No documentation. /// No documentation. /// No documentation. /// No documentation. /// HRESULT ID2D1CommandSink::DrawBitmap([In] ID2D1Bitmap* bitmap,[In, Optional] const D2D_RECT_F* destinationRectangle,[In] float opacity,[In] D2D1_INTERPOLATION_MODE interpolationMode,[In, Optional] const D2D_RECT_F* sourceRectangle,[In, Optional] const D2D_MATRIX_4X4_F* perspectiveTransform) void DrawBitmap(SharpDX.Direct2D1.Bitmap bitmap, RawRectangleF? destinationRectangle, float opacity, SharpDX.Direct2D1.InterpolationMode interpolationMode, RawRectangleF? sourceRectangle, RawMatrix? erspectiveTransformRef); /// /// [This documentation is preliminary and is subject to change.] /// /// The image to be drawn to the command sink. /// 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. /// The corresponding rectangle in the image space will be mapped to the provided origins when processing the image. /// The interpolation mode that will be used to scale the image if necessary. /// If specified, the composite mode that will be applied to the limits of the currently selected clip. /// /// 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. /// /// HRESULT ID2D1CommandSink::DrawImage([In] ID2D1Image* image,[In, Optional] const D2D_POINT_2F* targetOffset,[In, Optional] const D2D_RECT_F* imageRectangle,[In] D2D1_INTERPOLATION_MODE interpolationMode,[In] D2D1_COMPOSITE_MODE compositeMode) void DrawImage(SharpDX.Direct2D1.Image image, RawVector2? targetOffset, RawRectangleF? imageRectangle, SharpDX.Direct2D1.InterpolationMode interpolationMode, SharpDX.Direct2D1.CompositeMode compositeMode); /// /// No documentation. /// /// No documentation. /// No documentation. /// HRESULT ID2D1CommandSink::DrawGdiMetafile([In] ID2D1GdiMetafile* gdiMetafile,[In, Optional] const D2D_POINT_2F* targetOffset) void DrawGdiMetafile(SharpDX.Direct2D1.GdiMetafile gdiMetafile, RawVector2? targetOffset); /// /// [This documentation is preliminary and is subject to change.] /// /// The mesh object to be filled. /// The brush with which to fill the mesh. /// HRESULT ID2D1CommandSink::FillMesh([In] ID2D1Mesh* mesh,[In] ID2D1Brush* brush) void FillMesh(SharpDX.Direct2D1.Mesh mesh, SharpDX.Direct2D1.Brush brush); /// /// [This documentation is preliminary and is subject to change.] /// /// The bitmap whose alpha channel will be sampled to define the opacity mask. /// The brush with which to fill the mask. /// The type of content that the mask represents. /// The destination rectangle in which to fill the mask. If not specified, this is the origin. /// /// The opacity mask bitmap must be considered to be clamped on each axis. /// /// HRESULT ID2D1CommandSink::FillOpacityMask([In] ID2D1Bitmap* opacityMask,[In] ID2D1Brush* brush,[In, Optional] const D2D_RECT_F* destinationRectangle,[In, Optional] const D2D_RECT_F* sourceRectangle) void FillOpacityMask(SharpDX.Direct2D1.Bitmap opacityMask, SharpDX.Direct2D1.Brush brush, RawRectangleF? destinationRectangle, RawRectangleF? sourceRectangle); /// /// [This documentation is preliminary and is subject to change.] /// /// The geometry that should be filled. /// The primary brush used to fill the geometry. /// A brush whose alpha channel is used to modify the opacity of the primary fill brush. /// /// 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. /// /// HRESULT ID2D1CommandSink::FillGeometry([In] ID2D1Geometry* geometry,[In] ID2D1Brush* brush,[In, Optional] ID2D1Brush* opacityBrush) void FillGeometry(SharpDX.Direct2D1.Geometry geometry, SharpDX.Direct2D1.Brush brush, SharpDX.Direct2D1.Brush opacityBrush); /// /// [This documentation is preliminary and is subject to change.] /// /// The rectangle to fill. /// The brush with which to fill the rectangle. /// HRESULT ID2D1CommandSink::FillRectangle([In] const D2D_RECT_F* rect,[In] ID2D1Brush* brush) void FillRectangle(RawRectangleF rect, SharpDX.Direct2D1.Brush brush); /// /// [This documentation is preliminary and is subject to change.] /// /// The rectangle that defines the clip. /// Whether the given clip should be antialiased. /// /// If the current world transform is not preserving the axis, clipRectangle is transformed and the bounds of the transformed rectangle are used instead. /// /// HRESULT ID2D1CommandSink::PushAxisAlignedClip([In] const D2D_RECT_F* clipRect,[In] D2D1_ANTIALIAS_MODE antialiasMode) void PushAxisAlignedClip(RawRectangleF clipRect, SharpDX.Direct2D1.AntialiasMode antialiasMode); /// /// No documentation. /// /// No documentation. /// No documentation. /// HRESULT ID2D1CommandSink::PushLayer([In] const D2D1_LAYER_PARAMETERS1* layerParameters1,[In, Optional] ID2D1Layer* layer) void PushLayer(ref SharpDX.Direct2D1.LayerParameters1 layerParameters1, SharpDX.Direct2D1.Layer layer); /// /// [This documentation is preliminary and is subject to change.] /// /// HRESULT ID2D1CommandSink::PopAxisAlignedClip() void PopAxisAlignedClip(); /// /// No documentation. /// /// HRESULT ID2D1CommandSink::PopLayer() void PopLayer(); } }