简体   繁体   English

使用锚点旋转和缩放图像视图

[英]Rotate and scale image view with anchor points android

How to rotate and scale the image view with points around the corner of the image like in MS OFFICE. 如何旋转和缩放图像视图,例如在MS OFFICE中围绕图像的角点。 So that the points will be the anchor points of the image. 这样这些点将成为图像的锚点。

在此处输入图片说明

Let's say that the anchor point located at (5, 20) 假设锚点位于(5,20)

  1. Move the image so that the anchor point will be at (0, 0) by moving the image to (-5, -20) 移动图像,以便将图像移动到(-5,-20),使锚点位于(0,0)
  2. Rotate & Scale 旋转和缩放
  3. Move the the resulted image by (5, 20) so that the anchor point will be located back at (5, 20) 将结果图像移动(5,20),以便锚点重新定位在(5,20)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM