コード例 #1
0
        public D2D1RectF GetWidenedBounds(float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform, float flatteningTolerance)
        {
            D2D1RectF bounds;

            GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned);

            try
            {
                this.GetHandle<ID2D1Geometry>().GetWidenedBounds(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), flatteningTolerance, out bounds);
            }
            finally
            {
                worldTransformHandle.Free();
            }

            return bounds;
        }
コード例 #2
0
        public bool StrokeContainsPoint(D2D1Point2F point, float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform)
        {
            bool contains;

            GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned);

            try
            {
                this.GetHandle<ID2D1Geometry>().StrokeContainsPoint(point, strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out contains);
            }
            finally
            {
                worldTransformHandle.Free();
            }

            return contains;
        }
コード例 #3
0
 public D2D1RectF GetWidenedBounds(float strokeWidth, D2D1StrokeStyle strokeStyle, float flatteningTolerance)
 {
     D2D1RectF bounds;
     this.GetHandle<ID2D1Geometry>().GetWidenedBounds(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), IntPtr.Zero, flatteningTolerance, out bounds);
     return bounds;
 }
コード例 #4
0
        public void Widen(float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform, D2D1SimplifiedGeometrySink geometrySink)
        {
            if (geometrySink == null)
            {
                throw new ArgumentNullException("geometrySink");
            }

            GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned);

            try
            {
                this.GetHandle<ID2D1Geometry>().Widen(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>());
            }
            finally
            {
                worldTransformHandle.Free();
            }
        }
コード例 #5
0
 public bool StrokeContainsPoint(D2D1Point2F point, float strokeWidth, D2D1StrokeStyle strokeStyle)
 {
     bool contains;
     this.GetHandle<ID2D1Geometry>().StrokeContainsPoint(point, strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), IntPtr.Zero, D2D1Constants.DefaultFlatteningTolerance, out contains);
     return contains;
 }
コード例 #6
0
        public void Widen(float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1SimplifiedGeometrySink geometrySink)
        {
            if (geometrySink == null)
            {
                throw new ArgumentNullException("geometrySink");
            }

            this.GetHandle<ID2D1Geometry>().Widen(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), IntPtr.Zero, D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>());
        }
コード例 #7
0
        public void DrawLine(D2D1Point2F point0, D2D1Point2F point1, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
        {
            if (brush == null)
            {
                throw new ArgumentNullException("brush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawLine(point0, point1, brush.GetHandle<ID2D1Brush>(), strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>());
        }
コード例 #8
0
        public void DrawGeometry(D2D1Geometry geometry, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
        {
            if (geometry == null)
            {
                throw new ArgumentNullException("geometry");
            }

            if (brush == null)
            {
                throw new ArgumentNullException("brush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawGeometry(geometry.GetHandle<ID2D1Geometry>(), brush.GetHandle<ID2D1Brush>(), strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>());
        }
コード例 #9
0
        public void DrawEllipse(D2D1Ellipse ellipse, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
        {
            if (brush == null)
            {
                throw new ArgumentNullException("brush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawEllipse(ref ellipse, brush.GetHandle<ID2D1Brush>(), strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>());
        }
コード例 #10
0
        public void DrawRoundedRectangle(D2D1RoundedRect roundedRect, D2D1Brush brush, float strokeWidth, D2D1StrokeStyle strokeStyle)
        {
            if (brush == null)
            {
                throw new ArgumentNullException("brush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawRoundedRectangle(ref roundedRect, brush.GetHandle<ID2D1Brush>(), strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>());
        }