rescale using affineTransform, but scaling factor isn't quite honored?



Hi, I'm using affineTransform to rescale a polygon to fit in the
screens area. If the shape is 25% smaller than the drawing area, then
the shape is increased by 25%. Each side of the shapes length in
inches is initially the same as the length of the side in pixels.

I need the lengths to stay the same when I re-scale the polygon... To
acheive this, I'm storing the "factor" that I'm supplying to
AffineTransform... Then, in my getLength() method I divide by this
same number to "reverse" the transform and get the real edge length.
Sometimes it works great (less than half) but usually it is off. It's
usually off by less than 1, but occasionally by some huge amount like
30%.

I was thinking this was a casting problem, but it seems to be something
a little trickier. It seems that the affineTransform scale is actually
not using the same scaling factor all the time.. Does anyone knw
what variables might throw this off and how I might be able to control
it?

Thanks!
Graham Street

.