mehdi shahdoost
mehdi shahdoost

Reputation: 1489

java2d and scale

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

Upvotes: 0

Views: 1122

Answers (1)

trashgod
trashgod

Reputation: 205785

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

Upvotes: 1

Related Questions