Interface Placement


  • public interface Placement
    Computes an overlay's bounds from the current screen bounds.
    • Method Detail

      • resolve

        Rect resolve​(Rect screen)
        Resolves the overlay bounds for the given screen bounds.
        Parameters:
        screen - the current screen bounds
        Returns:
        the overlay bounds
      • centered

        static Placement centered​(int width,
                                  int height)
        Creates a placement centered on and clamped to the screen at the given size.
        Parameters:
        width - the desired width
        height - the desired height
        Returns:
        a centered placement
      • fixed

        static Placement fixed​(Rect rect)
        Creates a placement at a fixed rectangle, independent of screen size.
        Parameters:
        rect - the fixed overlay bounds
        Returns:
        a fixed placement