public void CombineWithGeometry(D2D1Geometry inputGeometry, D2D1CombineMode combineMode, D2D1SimplifiedGeometrySink geometrySink)
        {
            if (inputGeometry == null)
            {
                throw new ArgumentNullException("inputGeometry");
            }

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

            this.GetHandle<ID2D1Geometry>().CombineWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), combineMode, IntPtr.Zero, D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>());
        }
        public void CombineWithGeometry(D2D1Geometry inputGeometry, D2D1CombineMode combineMode, D2D1Matrix3X2F inputGeometryTransform, D2D1SimplifiedGeometrySink geometrySink)
        {
            if (inputGeometry == null)
            {
                throw new ArgumentNullException("inputGeometry");
            }

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

            GCHandle inputGeometryTransformHandle = GCHandle.Alloc(inputGeometryTransform, GCHandleType.Pinned);

            try
            {
                this.GetHandle<ID2D1Geometry>().CombineWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), combineMode, inputGeometryTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>());
            }
            finally
            {
                inputGeometryTransformHandle.Free();
            }
        }
        public D2D1GeometryRelation CompareWithGeometry(D2D1Geometry inputGeometry)
        {
            if (inputGeometry == null)
            {
                throw new ArgumentNullException("inputGeometry");
            }

            D2D1GeometryRelation relation;
            this.GetHandle<ID2D1Geometry>().CompareWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), IntPtr.Zero, D2D1Constants.DefaultFlatteningTolerance, out relation);
            return relation;
        }
        public D2D1GeometryRelation CompareWithGeometry(D2D1Geometry inputGeometry, D2D1Matrix3X2F inputGeometryTransform)
        {
            if (inputGeometry == null)
            {
                throw new ArgumentNullException("inputGeometry");
            }

            D2D1GeometryRelation relation;

            GCHandle inputGeometryTransformHandle = GCHandle.Alloc(inputGeometryTransform, GCHandleType.Pinned);

            try
            {
                this.GetHandle<ID2D1Geometry>().CompareWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), inputGeometryTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out relation);
            }
            finally
            {
                inputGeometryTransformHandle.Free();
            }

            return relation;
        }
        public D2D1TransformedGeometry CreateTransformedGeometry(D2D1Geometry sourceGeometry, D2D1Matrix3X2F transform)
        {
            if (sourceGeometry == null)
            {
                throw new ArgumentNullException("sourceGeometry");
            }

            ID2D1TransformedGeometry transformedGeometry;
            this.factory.CreateTransformedGeometry(sourceGeometry.GetHandle<ID2D1Geometry>(), ref transform, out transformedGeometry);
            return new D2D1TransformedGeometry(transformedGeometry);
        }
        public D2D1GeometryGroup CreateGeometryGroup(D2D1FillMode fillMode, D2D1Geometry[] geometries)
        {
            if (geometries == null)
            {
                throw new ArgumentNullException("geometries");
            }

            ID2D1GeometryGroup geometryGroup;
            this.factory.CreateGeometryGroup(fillMode, Array.ConvertAll(geometries, t => t.GetHandle<ID2D1Geometry>()), (uint)geometries.Length, out geometryGroup);
            return new D2D1GeometryGroup(geometryGroup);
        }
        public void FillGeometry(D2D1Geometry geometry, D2D1Brush brush, D2D1Brush opacityBrush)
        {
            if (geometry == null)
            {
                throw new ArgumentNullException("geometry");
            }

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

            this.GetHandle<ID2D1RenderTarget>().FillGeometry(geometry.GetHandle<ID2D1Geometry>(), brush.GetHandle<ID2D1Brush>(), opacityBrush == null ? null : opacityBrush.GetHandle<ID2D1Brush>());
        }
        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 DrawGeometry(D2D1Geometry geometry, D2D1Brush brush)
        {
            if (geometry == null)
            {
                throw new ArgumentNullException("geometry");
            }

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

            this.GetHandle<ID2D1RenderTarget>().DrawGeometry(geometry.GetHandle<ID2D1Geometry>(), brush.GetHandle<ID2D1Brush>(), 1.0f, null);
        }