AffineTransform: can I scale without translating?
I've noticed that the way the AffineTransform class scales shapes and areas affects their positions. For example, suppose I had a Rectangle2D R at point (10,10) and I did this:
R.transform(AffineTransform.getScaleInstance(2.0d, 0.0d));
Not only will R now be twice as wide, but it will be at (20, 10). The reason seems to be that the scaling that's being done here is not on R in particular but on the whole coordinate system (with the origin being the reference point). This results in both a scaling of R and a translation.
Is there some way to tell it not to do this (i.e. scale the Rectangle2D and not the coordinate system)?