can't get my coordinates graphics2D mouseclick java

后端 未结 3 1486
情书的邮戳
情书的邮戳 2021-01-26 22:41

I got an extended JLabel class where I draw my Map using the code below : the new AffineTransform() is the identity to left my image as it is (0,0,w,h)

3条回答
  •  盖世英雄少女心
    2021-01-26 22:52

    It sounds like you need both a forward and inverse transform to translate between the two co-ordinate systems. In this example, the scaling equations are explicit; in this alternate approach, a second AffineTransform is used.

提交回复
热议问题