|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.Resolution
public class Resolution
A resolution specifies a point density in two dimensions (horizontal, vertical) relative to a certain measurement unit. Please note that this class is immutable, i.e. it is safe to pass around instances of it without cloning.
Constructor Summary | |
---|---|
Resolution()
Create the default base resolution. |
|
Resolution(Dimension2D d,
Unit u)
|
|
Resolution(float r)
Create a uniform resolution (one being identical in both horizontally and vertically) based on a unit of dots per inch. |
|
Resolution(float horizontal,
float vertical)
Create a new resolution using dots per inch. |
|
Resolution(float w,
float h,
Unit u)
|
Method Summary | |
---|---|
protected void |
assertComponentsValid()
|
Resolution |
clone()
|
Resolution |
convertTo(Unit u)
|
AffineTransform |
createBaseTransform(Dimension2D size)
Create an AffineTransform scaling the unit square with this resolution to the given
size at base units. |
AffineTransform |
createTransform(Dimension2D size,
Unit u)
Create an AffineTransform scaling the unit square with this resolution to the given
size at the given resolution. |
AffineTransform |
createTransform(Resolution r)
|
boolean |
equals(Object obj)
|
float |
getMax()
Return the maximum of the two resolution components. |
float |
getMin()
Return the minimum of the two resolution components. |
Dimension2D |
getSize(Dimension2D size)
Return the physical size of a grid of the given size with this resolution. |
Dimension2D |
getSize(Dimension2D size,
Unit u)
Return the physical size of a grid of the given size with this resolution. |
Unit |
getUnit()
|
float |
getX()
Return the horizontal resolution. |
float |
getY()
Return the vertical resolution. |
int |
hashCode()
|
boolean |
isHomogenous()
Return whether the resolution is homogeneous, i.e. identical in both directions. |
Dimension |
toDimension()
Deprecated. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Resolution()
Document.BASE_RESOLUTION
public Resolution(float horizontal, float vertical)
horizontal
- vertical
- Unit.Inch
public Resolution(float w, float h, Unit u)
public Resolution(Dimension2D d, Unit u)
public Resolution(float r)
r
- Method Detail |
---|
protected void assertComponentsValid()
public Resolution clone()
clone
in class Object
public String toString()
toString
in class Object
@Deprecated public Dimension toDimension()
public Unit getUnit()
public Resolution convertTo(Unit u)
public Dimension2D getSize(Dimension2D size)
size
-
NullPointerException
- if the given size parameter is null
public Dimension2D getSize(Dimension2D size, Unit u)
size
-
public float getX()
public float getY()
public float getMax()
public float getMin()
public boolean isHomogenous()
true
if both components are equal.public AffineTransform createBaseTransform(Dimension2D size)
AffineTransform
scaling the unit square with this resolution to the given
size at base units.
size
-
AffineTransform
Document.BASE_RESOLUTION
public AffineTransform createTransform(Resolution r)
public AffineTransform createTransform(Dimension2D size, Unit u)
AffineTransform
scaling the unit square with this resolution to the given
size at the given resolution.
size
- u
-
AffineTransform
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2017 levigo holding gmbh. All rights reserved. |