이것을 시도 ..이 아래 그림처럼 갤럭시 참고로 제공된다.
사용자가 오른쪽에서 이미지를 터치하고 그 오른쪽을 드래그하면 아래 코드가 이미지의 크기를 조절하고 크기가 조절 된 이미지를 그립니다.
Bitmap bmpImage;
Rect src = new Rect();
Rect dst = new Rect();
src.left = initial_Start_pos_X; // initial Start X postion of image
src.top = initial_Start_pos_Y; // initial Start Y postion of image
src.right =initial_End_pos_X; // initial End X postion of image
src.bottom = initial_End_pos_Y; // initial End Y postion of image
dst.left = initial_Start_pos_X;
dst.top = initial_Start_pos_Y;
dst.right = Draged_Pox_X; // Drag X position of image
dst.bottom = initial_End_pos_Y;
canvas.drawBitmap(bmpImage, src, dst, paint); // This line will scaled the image according to dst rect. It will take the image from src rect and draw in dst rect. so it will scaled the image.
이미지를 드래그 할 때마다보기를 무효화해야합니다. ONTOUCHMOVE에서보기를 무효화해야합니다.
먼저 확인해야합니다. 사용자가 이미지의 어느면을 터치하고 드래그하면 위의 코드를 수정해야합니다. 위의 코드는 오른쪽에만 크기 조정 된 이미지 만 표시됩니다.