示例#1
0
        public Shape CreateWidened(DxGeometry resolvedSource, float width, float tolerance)
        {
            Contract.Requires(resolvedSource != null);
            Contract.Requires(Check.IsPositive(width));
            Contract.Requires(Check.IsPositive(tolerance));
            Contract.Ensures(Contract.Result<Shape>() != null);

            _Builder = Shape.Create();

            resolvedSource.Widen(width, null, null, tolerance, this);

            Shape result = _Builder.Build();

            _Builder = null;

            return result;
        }
示例#2
0
 /// <unmanaged>HRESULT ID2D1CommandSink::DrawGeometry([In] ID2D1Geometry* geometry,[In] ID2D1Brush* brush,[In] float strokeWidth,[In, Optional] ID2D1StrokeStyle* strokeStyle)</unmanaged>
 public void DrawGeometry(SharpDX.Direct2D1.Geometry geometry, SharpDX.Direct2D1.Brush brush, float strokeWidth, SharpDX.Direct2D1.StrokeStyle strokeStyle)
 {
     DrawGeometry_(geometry, brush, strokeWidth, strokeStyle);
 }
示例#3
0
 /// <unmanaged>HRESULT ID2D1CommandSink::FillGeometry([In] ID2D1Geometry* geometry,[In] ID2D1Brush* brush,[In, Optional] ID2D1Brush* opacityBrush)</unmanaged>
 public void FillGeometry(SharpDX.Direct2D1.Geometry geometry, SharpDX.Direct2D1.Brush brush, SharpDX.Direct2D1.Brush opacityBrush)
 {
     FillGeometry_(geometry, brush, opacityBrush);
 }
示例#4
0
 /// <summary>
 /// Paints the interior of the specified geometry.
 /// </summary>
 /// <remarks>
 /// If the opacityBrush parameter is not NULL, the alpha value of each pixel of the mapped opacityBrush is used to determine the resulting opacity of each corresponding pixel of the geometry. Only the alpha value of each color in the brush is used for this processing; all other color information is ignored.  The alpha value specified by the brush is multiplied by the alpha value of the geometry after the geometry has been painted by brush.
 /// When this method fails, it does not return an error code. To determine whether a drawing operation (such as FillGeometry) failed, check the result returned by the <see cref="EndDraw()"/> or <see cref="Flush()"/> method.
 /// </remarks>
 /// <param name="geometry">The geometry to paint.</param>
 /// <param name="brush">The brush used to paint the geometry's interior.</param>
 /// <unmanaged>void FillGeometry([In] ID2D1Geometry* geometry,[In] ID2D1Brush* brush,[In, Optional] ID2D1Brush* opacityBrush)</unmanaged>
 public void FillGeometry(SharpDX.Direct2D1.Geometry geometry, SharpDX.Direct2D1.Brush brush)
 {
     FillGeometry(geometry, brush, null);
 }
示例#5
0
 /// <summary>	
 /// Combines this geometry with the specified geometry and stores the result in an <see cref="SharpDX.Direct2D1.SimplifiedGeometrySink"/>.  	
 /// </summary>	
 /// <param name="inputGeometry">The geometry to combine with this instance.</param>
 /// <param name="combineMode">The type of combine operation to perform.</param>
 /// <param name="flatteningTolerance">The maximum bounds on the distance between points in the polygonal approximation of the geometries. Smaller values produce more accurate results but cause slower execution. </param>
 /// <param name="geometrySink">The result of the combine operation.</param>
 /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
 /// <unmanaged>HRESULT CombineWithGeometry([In] ID2D1Geometry* inputGeometry,[None] D2D1_COMBINE_MODE combineMode,[In, Optional] const D2D1_MATRIX_3X2_F* inputGeometryTransform,[None] FLOAT flatteningTolerance,[In] ID2D1SimplifiedGeometrySink* geometrySink)</unmanaged>
 public void Combine(SharpDX.Direct2D1.Geometry inputGeometry, SharpDX.Direct2D1.CombineMode combineMode, float flatteningTolerance, GeometrySink geometrySink)
 {
     this.Combine(inputGeometry, combineMode, null, flatteningTolerance, geometrySink);
 }