如何从 BufferedImage 裁剪多边形
如何裁剪 BufferedImage 的多边形部分并将其写入另一个 BufferedImage?
How to crop a polygon shaped portion of BufferedImage and write it to another BufferedImage?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Graphics2D有clip(Shape)和draw(Shape)方法。所以我猜你可以将 Shape 设置为多边形,然后从一个 BufferedImage 绘制到另一个。
Graphics2D has clip(Shape) and draw(Shape) methods. So I would guess you can set the Shape to be your polygon and then paint from one BufferedImage to the other.