translationInstance static method
Creates a transformation for a translation.
@param x the value to translate by in the x direction @param y the value to translate by in the y direction @return a transformation for the translation
Implementation
static AffineTransformation translationInstance(double x, double y) {
AffineTransformation trans = new AffineTransformation();
trans.setToTranslation(x, y);
return trans;
}