java2d and scale

喜欢而已 提交于 2020-01-06 06:01:48

问题


when I scale my shape [Rectangle] with g2d.scale(2,2) or with AffineTransform , I can't detect correct hit on shape because my shape scale still same as previous and only view of shape is change.

I need solution for solving this problem [change size of shape after Transform].

thanks


回答1:


You can either use an inverse transform, as shown here, or do the scaling explicitly, as shown here.



来源:https://stackoverflow.com/questions/3664908/java2d-and-scale

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!