Does anyone know under what circumstances AffineTransform.inverseTransform() is
Mathematically, this occurs when the matrix has a zero determinant.
Visually this happens when the transform specifies a transform that maps all coordinates in user space to a line or a point in device space.
(To understand how the two relate, when you invert the transform you are asking "If this transform takes points in the original coordinate space and maps them on to points in a destination coordinate space, what is the transform that reverses that transformation?" If the mapping in one direction is from a plane to a point, then how can a reverse mapping be created to specify how to map that point onto all of the coordinates of the original plane? It can't - thus the transform is not invertible...)
In my application I use Scale and Translate and Rotate, I do not use Shear.
Of the 3 - Scale, Translate, and Rotate, the only one of the 3 that has a chance to map all user space coordinates to a line or a point in device space would be the Scale type. As long as you never scale to a size of 0 in either or both of the X or Y direction then you should be OK.
An example of where something like this is likely to occur in practice is if you animate a figure to flip over by scaling it with values that vary from 1.0 (normal rendering) down to -1.0 (flipped rendering). As you iterate through the scale values from 1.0 to -1.0 you can at some point in the middle have a scale of 0.0 along the axis you are flipping it over. That is the point at which, visually, the figure looks like it is temporarily "side on" to your point of view and hard to see because it is so thin. And at this point in time you will have a transform that is mapping all coordinates in the figure to that thin vertical or horizontal line. At that point, the transform also happens to be invertible...
...jim
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
