canvas.getWidth()/getHeight() does not return the dimension of the View.
You should use View.getWidth()/getHeight() instead.


On Mon, Jul 23, 2012 at 10:27 AM, bob <[email protected]> wrote:

> Is there anything obviously wrong with this code?
>
> RectF rf = new RectF(0,0, canvas.getWidth()-1, canvas.getHeight()-1);
>  canvas.drawBitmap(button_bg, null, rf, null);
>
> The bitmap does not scale to fill the canvas properly.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to