Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
            }
        }