Hi i am using android canvas. I was using custom shaped. such as L shape, rectangle and polygon. Each shape was working perfectly. I found center points, so i was using polygon centroid. but i didn't get height and width of custom shape. I have given points
(20,30),(40,30),(40,90),(20,90),(15,70),(..)
path.move(arr(0).x, arr(0).y);
for(int i=0;i<arr.size();i++){
path.lineTo(arr.get(i).x,arr.get(i).y);
}
canvas.drawPath(mPaints, path);
how to get height and width of the points. pls share any comments.