i have an activity to display an image, i am able to zoom the image and move it, i have a rectangle in the center of the screen which doesnt move, i want all what it is inside this rectangle to be able to crop the image , how can i do it ?
I have a custom class only for rectangle's draw here is my code :
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
Rect mCropRectangle = new Rect();
mCropRectangle.set(
getLeft(),
getTop()+(getBottom()+getTop())/6,
getRight(),
getBottom()-(getBottom()+getTop())/6
);
}