private static boolean isIntegerTranslation(AffineTransform xform){
  if (xform.isIdentity()) {
    return true;
  }
  if (xform.getType() == AffineTransform.TYPE_TRANSLATION) {
    double tx=xform.getTranslateX();
    double ty=xform.getTranslateY();
    return (tx == (int)tx && ty == (int)ty);
  }
  return false;
}

private static boolean isIntegerTranslation ( AffineTransform xform ) { if ( xform . isIdentity ( ) ) { return true ; } if ( xform . getType ( ) == AffineTransform . TYPE_TRANSLATION ) { double tx = xform . getTranslateX ( ) ; double ty = xform . getTranslateY ( ) ; return ( tx == ( int ) tx && ty == ( int ) ty ) ; } return false ; }
returns true if the given affinetransform is an integer translation .
