I am making a app like Drive axle for Auto crop selected Path () using Paint () and then i make a this screen..
But my Problem is that my starting point start with 0 position TOP_LEFT_CORNER X AND Y AXIS
USING this x and y coordinates i make a this type of rectangle but i need this type of out put using this coordinates..
{"TOP_LEFT_X_AXIS":" 43", "TOP_LEFT_y_AXIS":" 278",
"TOP_RIGHT_X_AXIS":"532", "TOP_RIGHT_y_AXIS":" 300 "}}
"BOTTOM_RIGHT_X_AXIS":"510", "BOTTOM_RIGHT_y_AXIS":" 614",
"BOTTOM_LEFT_X_AXIS":" 45", "BOTTOM_LEFT_Y_AXIS":" 597",
Need this type of Out Put see this image..
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
path = new Path();
path.lineTo(x1, y1);
path.lineTo(x2, y2);
path.lineTo(x3, y3);
path.lineTo(x4, y4);
canvas.drawPath(path, currentPaint);
}
Edit :- 1-1-2014
Now i make rectangle successfully now i want to crop that part of images and set on another image view any idea about this..
Edit :- 1-07-2014
Now i want to draw a circle at corner tell me if you have any idea..