裁剪可绘制为正方形
我有一个可绘制对象,已将其大小调整为适当的所需高度(25dp),并且宽度按比例缩放。但是,我想要一个正方形的图像,宽度也为 25dp。但是,我不想扭曲图像,所以我希望裁剪可绘制对象右侧和左侧的相等部分,以给我中心 25dpx25dp。这可能吗?如何?过去两个小时我一直在努力,现在我准备认输了......
I have a drawable that I have resized to the appropriate desired height (25dp), and the width is scaled proportionally. However, I want an image that is square, with a width of 25dp as well. However, I do not want to distort the image, so I am looking to to crop equal portions of the right and left of the drawable to give me the center 25dpx25dp. Is this possible? How? I have been trying for the past two hours and I'm about ready to throw in the towel...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)