¡@

Home 

2014/10/16 ¤W¤È 08:11:04

android Programming Glossary: carbitmap

Animating and rotating an image in a Surface View

http://stackoverflow.com/questions/2439301/animating-and-rotating-an-image-in-a-surface-view

long startTime SystemClock.elapsedRealtime long currentTime float elapsedRatio 0 Bitmap bufferBitmap carBitmap Matrix matrix new Matrix while elapsedRatio 1 matrix.setRotate elapsedRatio degrees carBitmap Bitmap.createBitmap bufferBitmap.. 0 Bitmap bufferBitmap carBitmap Matrix matrix new Matrix while elapsedRatio 1 matrix.setRotate elapsedRatio degrees carBitmap Bitmap.createBitmap bufferBitmap 0 0 width height matrix true draw your canvas here using whatever method you've defined.. ratio will never exactly equal 1 you have to manually draw the last frame matrix new Matrix matrix.setRotate degrees carBitmap Bitmap.createBitmap bufferBitmap 0 0 width height matrix true draw the canvas again here as before And you can now set whatever..