title: Rotate Transformation and Keep in Range
body: <p>I have a transformation in Java:</p>
  
  <pre><code>    AffineTransform transform = new AffineTransform();
      transform.translate(x, y);
      transform.rotate(Math.toRadians(rotation));
      transform.translate(-x, -y);
  </code></pre>
  
  <p>I'm using it on four points that make up a rectangle.  The transformation rotates around the origin (x, y) as expected, but I want the most left point to stay where the origin x was, and the most top point to stay where the origin y was.</p>
  
  <p>Any ideas how to modify the transformation to achieve this?</p>