title: Canvas.drawBitmap() ignoring the tile mode of the paint
body: <p>I want to draw subparts of a bitmap, but at a different size. If the size is bigger than the source rectangle in the bitmap, then I want that section of the bitmap to tile to fill the destination area. However, instead of getting tiled they are getting stretched.</p>
  
  <p>I set up all the variables as follows:</p>
  
  <pre><code>Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.image);
  Rect srcRect = ...
  Rect dstRect = ...
  Paint p = new Paint();
  p.setShader(new BitmapShader(b, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT));
  </code></pre>
  
  <p>And then in the <code>draw()</code> method I draw as follows:</p>
  
  <pre><code>canvas.drawBitmap(b, srcRect, dstRect, p);
  </code></pre>
  
  <p>What am I doing wrong? How should I draw <code>srcRect</code> to <code>dstRect</code> such that my subpart of the bitmap gets tiled?</p>