public final class LayoutSize extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LayoutSize.AspectRatioFit |
Constructor and Description |
---|
LayoutSize() |
LayoutSize(float width,
float height) |
Modifier and Type | Method and Description |
---|---|
float |
aspectRatio() |
void |
clampNegativeToZero() |
void |
clampToMinimumSize(LayoutSize minimumSize) |
void |
expand(float width,
float height) |
LayoutSize |
expandedTo(LayoutSize other) |
LayoutSize |
fitToAspectRatio(LayoutSize aspectRatio,
LayoutSize.AspectRatioFit fit) |
float |
height() |
boolean |
isEmpty() |
boolean |
isZero() |
void |
scale(float scale) |
void |
scale(float widthScale,
float heightScale) |
void |
setHeight(float height) |
void |
setWidth(float width) |
void |
shrink(float width,
float height) |
LayoutSize |
shrunkTo(LayoutSize other) |
String |
toString() |
LayoutSize |
transposedSize() |
float |
width() |
public LayoutSize()
public LayoutSize(float width, float height)
public float width()
public float height()
public void setWidth(float width)
public void setHeight(float height)
public boolean isEmpty()
public boolean isZero()
public float aspectRatio()
public void expand(float width, float height)
public void shrink(float width, float height)
public void scale(float scale)
public void scale(float widthScale, float heightScale)
public LayoutSize expandedTo(LayoutSize other)
public LayoutSize shrunkTo(LayoutSize other)
public void clampNegativeToZero()
public void clampToMinimumSize(LayoutSize minimumSize)
public LayoutSize transposedSize()
public LayoutSize fitToAspectRatio(LayoutSize aspectRatio, LayoutSize.AspectRatioFit fit)
Revision 4.0.15 / 20220727-0149