наконец я обрезаю часть моего изображения, меняю его цвет и рисую его с помощью canvas:
(OnDraw)
Bitmap bm=((BitmapDrawable)getDrawable()).getBitmap();
Bitmap crdb = changeBitmapColor(Bitmap.createBitmap(bm,
Math.round(leftx), Math.round(topy), Math.round(rightx-leftx),Math.round(bottomy-topy)));
canvas.drawBitmap(crdb,leftx,topy,null);
метод changeBitmapColor
public Bitmap changeBitmapColor(Bitmap sourceBitmap)
{
Bitmap resultBitmap = sourceBitmap.copy(sourceBitmap.getConfig(),true);
Paint paint = new Paint();
ColorFilter filter = new LightingColorFilter(Color.WHITE, Color.RED);
paint.setColorFilter(filter);
Canvas canvas = new Canvas(resultBitmap);
canvas.drawBitmap(resultBitmap, 0, 0, paint);
return resultBitmap;
}
![enter image description here](https://i.stack.imgur.com/70f8O.png)