public class Dim
extends java.lang.Object
Constructor and Description |
---|
Dim(double width2,
double height2) |
Dim(int d,
int e) |
Modifier and Type | Method and Description |
---|---|
int |
getHeight() |
static Dim |
getLargest(java.util.Collection<Dim> dims)
Return a dim that is at least as large in width and height as all of the provided Dims.
|
int |
getScale(Dim dimToFit,
double zoomBase)
Returns the logarithm of the scale multiplier required to ensure
that the second dimension fits within the first, to the given logarithmic base.
|
int |
getWidth() |
void |
setHeight(int height) |
void |
setWidth(int width) |
java.lang.String |
toString() |
Dim |
union(Dim dim) |
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public java.lang.String toString()
toString
in class java.lang.Object
public Dim union(Dim dim)
dim
- a Dim to be added with this one for purposes of determining an enclosing Dim.public static Dim getLargest(java.util.Collection<Dim> dims)
dims
- a list of dims, to calculate the enclosing dimensionpublic int getScale(Dim dimToFit, double zoomBase)
dimToFit
- the dimension to fit inside this dimension.zoomBase
- the logarithm base (example 2.0 gives a multiplier of 2 for each integral zoom step.) Values greater than 1 are meaningful.