title: How to draw full 800 by 480 images on Android
body: <p>I've got an image that is 800 by 300, which I know is the width of my test platform's resolution (HTC Desire at 800x480). When I try to draw this image to the screen it scales oddly. It spills over the left hand side of the screen and fills almost all the vertical. </p>
  
  <p>I'm using code like this:</p>
  
  <p>canvas.drawBitmap( screen[1], new Rect(0,0,800,300), new Rect(0,0,800,300), null);</p>
  
  <p>For some reason</p>
  
  <p>width_x = canvas.getWidth();</p>
  
  <p>width_y = canvas.getHeight();</p>
  
  <p>reports my resolution as 533 by 320. Now I assume this is for the <em>expletive-deleted</em> fascinating scaling system android uses so apps appear the same size on all phones but I want to ignore this. I'm writing a game, so want to handle scaling and positioning myself - for instance using more screen estate if it becomes available. Best android practice may be suitable for an icon based application, but I would like to draw to absolute pixel positions, and get absolute resolution information for the screen. </p>
  
  <p>Therefore my question is this - is this absolutely impossible? If it is completely contraindicated because android has a simple and effective system in place to do this then I would be interested to know what it is. dpi is not relevant to my game design (just like if this was a pc game, it would be irrelevant)</p>
  
  <p>Perhaps my screen actually 533 by 320 unless I specify a resolution somehow? I tried using the scaling values from width and height and the image was the correct size on screen, roughly, but had jagged edges because some sort of scaling had occurred. I therefore did not have access to all the pixels my screen is capable of displaying.</p>
  
  <p>To scale it I used something like </p>
  
  <p>canvas.drawBitmap( screen[1], new Rect(0,0,800,300), new Rect((int)(0.0f),(int)(0.0f),(int)(533.0f),(int)(187.5f)), null); // numbers just whacked in for testing - ratio equivalent to reported screen resolution. Looks horrid</p>
  
  <p>Any help would be very much appreciated.</p>
  
  <p>Cheers,</p>
  
  <p>Robin. </p>