0

我正在使用 MultiTouch-Controller 类(https://code.google.com/p/android-multitouch-controller/)并尝试调整 MtPhotoSortr 示例,以便在可绘制对象上绘制的圆圈每帧都保存。

从广义上讲,如果我有一个带有 onDraw() 函数的视图,是否可以将位图/画布的内容“复制”到可绘制对象中,而无需每帧都对其进行初始化。

现在我有

public class A extends View implements MultiTouchObjectCanvas<MultiTouchControllerView.Img> {
Drawable d;
Bitmap bmp;
Canvas bmpCanvas;

void init()
{

/// initialized everything correctly .

bmpCanvas=new Canvas(bmp);

}

// other functions  that scale,rotate and translate the drawable only ....
// like scaleandposition drawable on touch ,etc....
void onDraw(Canvas canvas)
{

   d.draw(canvas);
   bmpCanvas.drawCircle(touchX,touchY,radius,mPaint);

 /// Combine d and bmpCanvas ,without using d=new BitmapDrawable(bmp);

}
}

任何指针将不胜感激!

干杯,R

4

0 回答 0