Hi, I have a program in which the app's main view displays a small part of a much larger area. The user has suitable controls (touch, directional pad, etc) to pan around, much like Google Maps.
Since drawing is reasonably expensive (there are several layers to compute & draw), the technique I've gone for is to draw to an offscreen bitmap that's a bit larger than the screen, and then drawBitmap() from that in the view's onDraw() method. When the user pans the visible area, I want to scroll what's already been drawn, and only redraw the part that's been brought into view, thus reducing the amount of time spent drawing at the expense of more time blitting, on the assumption that blitting is cheaper. The trouble is that scrolling a bitmap - i.e. drawing it upon itself, offset by some amount - fails when the direction is negative, i.e. when the source address is linearly below the destination address and the ranges overlap. It's clear that the graphics driver uses a naive memcpy() implementation that doesn't bother to check which direction copying should be done. Having worked in low-level graphics on other platforms my instinct is to consider this a platform bug, but am interested to hear the opinions of more experienced Android/Linux developers. (Incidentally I do have a workaround - to use two offscreen bitmaps and switch between them - but I'm not exactly thrilled about it. :-) Many thanks, -- Reuben Harris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

