有没有更好的方法来移动画布内的位图而无需每次都重绘位图?
public void onOffsetsChanged(float xOffset, float yOffset, float xStep, float yStep, int xPixels, int yPixels) {
final SurfaceHolder holder = getSurfaceHolder();
Canvas c = null;
try {
c = holder.lockCanvas();
if (c != null) {
c.drawBitmap(this.ImageI, xPixels, 0, null);
c.drawBitmap(this.ImageII, xPixels, 0, paint);
}
} finally {
if (c != null) holder.unlockCanvasAndPost(c);
}
}