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;
        }
        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;
        }
 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;
 }
        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();
            }
        }
 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;
 }
        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>());
        }
        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>());
        }
        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>());
        }
        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>());
        }
        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>());
        }