Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将矩形转换为图像中显示的形状..?
我已经尝试了所有可以使用 AffineTransform 来做到这一点的方法。但我无法得到预期的结果。我想确定这是一项不可能完成的任务还是有办法做到这一点。
根据定义,仿射变换保留点、直线和平面。
因此,您最多可以将矩形转换为旋转的平行四边形(相反的线将保持平行)。
要实现更复杂的形状,您需要更一般的变换,如投影变换(也称为 Homography)(仿射变换是一种特殊的射影变换)。