Example #1
0
        public Bitmap(int width, int height, Graphics g)
        {
            if (g == null)
            {
                throw new ArgumentNullException("g");
            }

            IntPtr bmp;
            Status s = GDIPlus.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out bmp);

            GDIPlus.CheckStatus(s);
            nativeObject = bmp;
        }