title: background image not getting loaded in SDL
body: <p>i want to display an image(.png) in a frame in SDL.But,somehow only the frame appears and image does not get loaded.i am reading the image details from an XML file.this is the sample code i am trying:</p>
  
  <p>Class myclass{</p>
  
  <p>mysurface2(io.loadAndSet(myftndata->getXmlStr("backfile"), true) ),    </p>
  
  <p>myfframe(new fframe(img2,
                  myftn->getXmlInt("backWidth"), 
                  myftn->getXmlInt("backHeight"), 0, 0)),</p>
  
  <p>myobjects()</p>
  
  <p>{</p>
  
  <pre><code>      if (SDL_Init(SDL_INIT_VIDEO) != 0) 
       {
         throw string("SDL Error!!!: ");             
       }
  
      atexit(SDL_Quit);
  </code></pre>
  
  <p>}</p>
  
  <p>};</p>
  
  <pre><code>void myclass::drawImg() const {
  SDL_FillRect( screen, NULL, SDL_MapRGB(screen-&gt;format, 255, 255, 255) );
  SDL_Rect dest = {0, 0, 0, 0};
  SDL_BlitSurface( screen, NULL, screen, &amp;dest );
  }
  void myclass::move() 
   {
        while ( not done ) 
        {
          drawImg();    
          SDL_Flip(screen);
        }
   }
  </code></pre>
  
  <p>Please note: i have an entire framework,which i cannot give here.The above is my code that i am trying.</p>