I think you are possibly doing this the wrong way. There is a canvas.translate() method which moves the canvas itself. This just sets the hardware to look at a translated location, so should be instantaneous plus or minus 1 nanosecond.
The downside is that you will need to draw the image to a larger sized bitmap than the screen, to cater for the movement you allow in your canvas.translate call, 19 pixels all around in your example. On Mar 20, 9:07 am, Jeffrey <[email protected]> wrote: > I'm trying to make a simple (or so I thought) live wallpaper that > takes an image and moves it slowly in a circular motion, to make the > picture seem less static and more like looking out a window. I took > the live wallpaper tutorial from the SDK and stripped it down to the > bare bones so I could add to it. But the issue is that no matter what > size the image I'm moving, or what format (drawable or bitmap), it is > only getting about 3 fps. > > I don't know what to do to make this run faster, I have very limited > programming knowledge so I don't know if I'm missing something stupid. > > Also, this is the code I'm using to calculate the circular movement: > > int NewX = (int) (OffsetX + Math.sin(Dist)*19); > int NewY = (int) (OffsetY + Math.cos(Dist)*19); > > where Dist is the speed it's moving and 19 is the radius of the > circle. > > Is there an easier way? I looked into Tween animation but I don't know > how I would implement my circle code into it. -- 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

