setToTranslation method
Sets this transformation to be a translation. For a translation by the vector (x, y) the transformation matrix has the value:
@param dx the x component to translate by @param dy the y component to translate by @return this transformation, with an updated matrix| 1 0 dx | | 1 0 dy | | 0 0 1 |
Implementation
AffineTransformation setToTranslation(double dx, double dy) {
m00 = 1.0;
m01 = 0.0;
m02 = dx;
m10 = 0.0;
m11 = 1.0;
m12 = dy;
return this;
}