看类Graphics2D的文档:
public abstract void rotate(double theta)
Concatenates the current Graphics2D Transform with a rotation transform. Subsequent rendering is rotated by the specified radians relative to the previous origin. This is equivalent to calling transform(R), where R is an AffineTransform represented by the following matrix:
          [   cos(theta)    -sin(theta)    0   ]
          [   sin(theta)     cos(theta)    0   ]
          [       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.
Parameters:
theta - the angle of rotation in radians

解决方案 »

  1.   

    不过这个问题难点不在java怎么实现,而是你的数学知识够不够。
      

  2.   

    不用这么复杂,上面的矩阵是affineTransform使用需要用的
    选择只需要
    [ cosx  -sinx]
    [ sinx   cosx]
    即可,默认中心点为width/2, height/2
    你可以自己随便定义的!
      

  3.   

    感谢各位提供思路,用Graphics2D的scale方法实现了。