Beispiel #1
0
        /// <summary>
        /// Creates an exact copy of this <see cref='Image'/>.
        /// </summary>
        public object Clone()
        {
            IntPtr cloneImage = IntPtr.Zero;

            Gdip.CheckStatus(Gdip.GdipCloneImage(new HandleRef(this, nativeImage), out cloneImage));
            ValidateImage(cloneImage);

            return(CreateImageObject(cloneImage));
        }
Beispiel #2
0
        public object Clone()
        {
            IntPtr newimage = IntPtr.Zero;
            int status = Gdip.GdipCloneImage(nativeImage, out newimage);
            Gdip.CheckStatus(status);

            if (this is Bitmap)
                return new Bitmap(newimage);
            else
                return new Metafile(newimage);
        }
Beispiel #3
0
        public object Clone()
        {
            IntPtr newimage;
            int    status = Gdip.GdipCloneImage(nativeImage, out newimage);

            Gdip.CheckStatus(status);

            if (this is Bitmap)
            {
                return(new Bitmap(newimage));
            }
            else
            {
                return(new Metafile(newimage));
            }
        }