public class AspectRatioUtil
extends java.lang.Object
| Constructor and Description |
|---|
AspectRatioUtil() |
| Modifier and Type | Method and Description |
|---|---|
static float |
calculateAspectRatio(float left,
float top,
float right,
float bottom)
Calculates the aspect ratio given a rectangle.
|
static float |
calculateBottom(float left,
float top,
float right,
float targetAspectRatio)
Calculates the y-coordinate of the bottom edge given the other sides of
the rectangle and an aspect ratio.
|
static float |
calculateHeight(float left,
float right,
float targetAspectRatio)
Calculates the height of a rectangle given the left and right edges and
an aspect ratio.
|
static float |
calculateLeft(float top,
float right,
float bottom,
float targetAspectRatio)
Calculates the x-coordinate of the left edge given the other sides of the
rectangle and an aspect ratio.
|
static float |
calculateRight(float left,
float top,
float bottom,
float targetAspectRatio)
Calculates the x-coordinate of the right edge given the other sides of
the rectangle and an aspect ratio.
|
static float |
calculateTop(float left,
float right,
float bottom,
float targetAspectRatio)
Calculates the y-coordinate of the top edge given the other sides of the
rectangle and an aspect ratio.
|
static float |
calculateWidth(float top,
float bottom,
float targetAspectRatio)
Calculates the width of a rectangle given the top and bottom edges and an
aspect ratio.
|
public static float calculateAspectRatio(float left,
float top,
float right,
float bottom)
public static float calculateLeft(float top,
float right,
float bottom,
float targetAspectRatio)
public static float calculateTop(float left,
float right,
float bottom,
float targetAspectRatio)
public static float calculateRight(float left,
float top,
float bottom,
float targetAspectRatio)
public static float calculateBottom(float left,
float top,
float right,
float targetAspectRatio)
public static float calculateWidth(float top,
float bottom,
float targetAspectRatio)
public static float calculateHeight(float left,
float right,
float targetAspectRatio)