我有代码:
@Override
protected void onDraw(final Canvas canvas) {
super.onDraw(canvas);
if (DrawInfor.mDrawing != null) { //this is array path
if (DrawInfor.mDrawing.size() > 0) {
for (DrawingObject drawobj: DrawInfor.mDrawing) {
canvas.drawPath(drawobj.getPath(), mPaint);
}
}
}
}
当我选择擦除时,我设置:
m_Paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
m_Paint.setStrokeWidth(30);
但它不起作用,画布画黑线
我该怎么办?我不能删除arraylist因为我需要它用于许多功能