code: public static void getMovementAreaPosition(Settings settings, Rect out) {
          tmpRect1.set(0, 0, settings.getViewportW(), settings.getViewportH());
          Gravity.apply(settings.getGravity(),
                  settings.getMovementAreaW(), settings.getMovementAreaH(), tmpRect1, out);
      }
docs: Calculates movement area position within viewport area with gravity applied.
  
  @param settings Image settings
  @param out Output rectangle