Change-Id: I1050c3e1ad1280480f35a03c9d29dc1cd44b515f
ImageDraw idraw = (ImageDraw) mImageShow;
idraw.setStyle(ImageFilterDraw.SIMPLE_STYLE);
} else if (item.getItemId() == R.id.draw_menu_clear) {
- FilterDrawRepresentation drawRep = (FilterDrawRepresentation) getLocalRepresentation();
- drawRep.clear();
+ ImageDraw idraw = (ImageDraw) mImageShow;
+ idraw.resetParameter();
commitLocalRepresentation();
}
mView.invalidate();
}
if (representation.mDrawing != null) {
mDrawing = (Vector<StrokeData>) representation.mDrawing.clone();
+ } else {
+ mDrawing = null;
}
+
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
if (mOverlayBitmap == null ||
mOverlayBitmap.getWidth() != canvas.getWidth() ||
- mOverlayBitmap.getHeight() != canvas.getHeight()) {
+ mOverlayBitmap.getHeight() != canvas.getHeight() ||
+ mParameters.getDrawing().size() < mCachedStrokes) {
mOverlayBitmap = Bitmap.createBitmap(
canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);