Java's transformations done with Graphics2D
and AffineTransforms
have a last-specified, first-applied order. For example, to rotate a component and then translate it, you first call translate()
and later rotate()
. Why is that? Is there some application or implementation that favors it? To me it just seems counter-intuitive.
I understand that AffineTransforms
are represented with a matrix, and (while I don't know the details) multiple transforms can be concatenated by multiplying the matrices onto each other. What I don't understand is why this seems to be a right-multiply instead of a left-multiply.