开发者

java2d and scale

开发者 https://www.devze.com 2023-01-15 00:53 出处:网络
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 sca开发者_如何转开发le still same as previous and only view of sha

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 sca开发者_如何转开发le 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消