> how about using translate on top of the scale transform
> is there any difference on using scale on top of the translate
> transform?
All transforms are last-invoked-first-applied. For example:
setToTranslate(tx, ty)
scale(sx, sy)
Tx(x, y) == [sx * x + tx, sy * y + ty]
In this case, the translation is unaffected by the scale. Coordinates
in user space are first scaled by sx,sy and then translated by tx,ty.
setToScale(sx, sy)
translate(tx, ty)
Tx(x, y) == [(x + tx) * sx, (y + ty) * sy]
In this case, the translation is scaled by the scale since it is applied
before the scale. Coordinates in user space are first translated and
then the translated coordinates are scaled.
Finally, going back to the previous point:
setToScale(sx, sy)
setToTranslate(tx, ty)
Tx(x, y) == [x + tx, y + ty]
The scale here was erased by the translate since the "setTo" form
of the method was used...
Does that answer your questions?
...jim
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/