|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.coobird.thumbnailator.geometry.RelativeSize
public class RelativeSize
Calculates the size of an enclosed object relative to the enclosing object.
Constructor Summary | |
---|---|
RelativeSize(double scalingFactor)
Instantiates an object which calculates the size of an object, using the given scaling factor. |
Method Summary | |
---|---|
Dimension |
calculate(int width,
int height)
Calculates the size of the object. |
String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RelativeSize(double scalingFactor)
scalingFactor
- The scaling factor to use to determine the
size of the enclosing object.
IllegalArgumentException
- When the scaling factor is not within
the range of 0.0d
and
1.0d
, inclusive.Method Detail |
---|
public Dimension calculate(int width, int height)
Size
calculate
in interface Size
width
- Width of the object which encloses the object
for which the size should be determined.height
- Height of the object which encloses the object
for which the size should be determined.
public String toString()
String
representation of this object.
toString
in class Object
String
representation of this object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |