title: Draw text inside a filled rectangle using Canvas Android
body: <p>How to draw a filled rectangle with specified bounds and inside that rectangle text to be drawn using Canvas Android ?? I tried </p>
  
  <pre><code>mPaint.setColor(Color.GREEN);
  canvas.drawText(mText, x, y, mPaint);
  mPaint.setColor(Color.BLACK);
  canvas.drawRect(x, y, x + w, y + h, mPaint);
  </code></pre>
  
  <p>but text is not inside of that rectangle. Can any buddy tell me how to draw a rectangle  surrounding specified text with consideration of text size ?? </p>