Hi,

I'm trying to implement pan and zoom across a bitmap and I'm using
Canvas.drawBitmap(bitmap, src, dest, paint) where "dest" is the
rectangle of the Android device screen.

The difference in implementation I'm seeing is that I can set a "src"
Rect with negative coordinates and drawBitmap() will return "empty"
space in API 8.  In a sense this means I'm scaling and translating
from a larger, virtual bitmap (which is what I want).  This helps me
implement panning, for instance if I want to display one edge of the
bitmap in the center of the dest (screen) as a result of the user
panning it there.

However in API 7 my "src" rect seems clipped to the actual bitmap
boundary and the negative Rect coordinates are ignored.

Any thoughts or comments on how Canvas.drawBitmap() differs under
different API levels or devices?  If I want to pan across a bitmap,
but show the boundary to the user, what would be a good implementation
strategy?

Thanks!

John Roberts

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