Exemple #1
0
        /// <include file='doc\Region.uex' path='docs/doc[@for="Region.Complement2"]/*' />
        /// <devdoc>
        ///    Updates this <see cref='System.Drawing.Region'/> to the portion of the
        ///    specified <see cref='System.Drawing.Drawing2D.GraphicsPath'/> that does not intersect with this
        /// <see cref='System.Drawing.Region'/>.
        /// </devdoc>
        public void Complement(GraphicsPath path)
        {
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            int status = SafeNativeMethods.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Complement);

            if (status != SafeNativeMethods.Ok)
            {
                throw SafeNativeMethods.StatusException(status);
            }
        }