I am drawing on a SurfaceView canvas.

To make it look roughly the same on various screen densities I use
canvas.scale(...) with DisplayMetrics.density as parameters.

This works great overall. My drawn primitives and text look exactly
right across all screen sizes.

But if I try to draw a bitmap on this scaled canvas it always looks
bad, as it gets scaled too. What I want to do is to create a pre-
scaled bitmap (which I can very easily do) and then I want to draw it
on this scaled canvas as is, without another scaling.

The only way I am able to achieve this is by canvas.save(), setting up
a new identity matrix, drawing, then canvas.restore().

Is it really the only way to do it? It looks to me like I'm missing
something and there is got to be a better way.

Thanks!


Andrew.

-- 
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