title: Using Canvas.drawBitmap with matrix produces wrong size
body: <p>Having loaded a bitmap image from a resource without scaling, I'm attempting to draw it directly to a canvas using the draw bitmap method in conjunction with a suitable scaling matrix. Unfortunately, the bitmap doesn't appear to exhibit the correct dimensions when drawn - an identity matrix which is post-scaled by (0.5, 0.5), doesn't render an image of half the bitmap dimensions. Is there something I'm overlooking here?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import android.content.Context;
  import android.view.View;
  import android.graphics.Canvas;
  import android.graphics.Paint;
  import android.graphics.Color;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.graphics.BitmapFactory.Options;
  import android.graphics.RectF;
  import android.graphics.Matrix;
  
  public class LogoView extends View
  {
   private final Matrix mf_logoMatrix;
   private final Paint mf_paint;
   private final Bitmap mf_logoBitmap;
  
  
   public LogoView(final Context p_context)
   { 
    super(p_context);
    mf_logoMatrix = new Matrix();
    mf_paint = new Paint();
    BitmapFactory.Options options = new BitmapFactory.Options();
    options.inScaled = false;
    mf_logoBitmap = BitmapFactory.decodeResource(p_context.getResources(),
                                                 R.drawable.logo_1500,
                                                 options);
   }
  
  
   @Override public void onDraw(Canvas p_canvas)
   {
    mf_paint.setColor(Color.BLACK);
    p_canvas.drawPaint(mf_paint);
    mf_logoMatrix.reset();
    mf_logoMatrix.preScale(0.5f, 0.5f);
    p_canvas.setMatrix(mf_logoMatrix);
    p_canvas.drawBitmap(mf_logoBitmap, mf_logoMatrix, null);
   }
  
  
  };
  </code></pre>