public class Resolution extends Object
Modifier and Type | Field and Description |
---|---|
static Resolution |
BASE_RESOLUTION
The jadice base resolution of 1/7200'th of an inch.
|
static Resolution |
DPI72
72 DPI (the same resolution as
POINTS but with a different base unit). |
static Resolution |
DPI96
96 DPI.
|
static Resolution |
POINTS
Points: 1/72'th of an inch (72 DPI).
|
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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.
|
AffineTransform |
scale(AffineTransform t,
Resolution r)
Augment the given transform so that it scale the unit square with this resolution to the given
target resolution.
|
String |
toString() |
public static final Resolution BASE_RESOLUTION
public static final Resolution POINTS
public static final Resolution DPI72
POINTS
but with a different base unit).public static final Resolution DPI96
public Resolution()
Document.BASE_RESOLUTION
public Resolution(float horizontal, float vertical)
Unit.Inch
public Resolution(float w, float h, Unit u)
public Resolution(Dimension2D d, Unit u)
public Resolution(float r)
protected void assertComponentsValid()
public Resolution clone()
public Unit getUnit()
public Resolution convertTo(Unit u)
public Dimension2D getSize(Dimension2D size)
NullPointerException
- if the given size parameter is null
public Dimension2D getSize(Dimension2D size, Unit u)
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.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.AffineTransform
public AffineTransform scale(AffineTransform t, Resolution r)
AffineTransform
is modified in place.t
- the transform to augmentr
- the target resolutionCopyright © 2024 levigo holding gmbh. All rights reserved.