Package com.tonic.vellum
Interface Placement
-
public interface PlacementComputes an overlay's bounds from the current screen bounds.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Placementcentered(int width, int height)Creates a placement centered on and clamped to the screen at the given size.static Placementfixed(Rect rect)Creates a placement at a fixed rectangle, independent of screen size.Rectresolve(Rect screen)Resolves the overlay bounds for the given 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 widthheight- the desired height- Returns:
- a centered placement
-
-