public static Graphics2 AttachD3D(System.Windows.Forms.Control control)
        {
            var obj = new Graphics2();

            obj.d3d   = new Direct3D9Graphics(control);
            obj.isD3D = true;
            return(obj);
        }
        public static Graphics2 FromGDI(System.Drawing.Graphics g)
        {
            var obj = new Graphics2();

            obj.gdi   = g;
            obj.isD3D = false;
            return(obj);
        }