Exemple #1
0
        /**
         * Make a copy of the region object
         */
        /// <include file='doc\Region.uex' path='docs/doc[@for="Region.Clone"]/*' />
        /// <devdoc>
        ///    Creates an exact copy if this <see cref='System.Drawing.Region'/>.
        /// </devdoc>
        public Region Clone()
        {
            IntPtr region = IntPtr.Zero;

            int status = SafeNativeMethods.GdipCloneRegion(new HandleRef(this, nativeRegion), out region);

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

            return(new Region(region, 0));
        }