public final class PixDoubTrans extends Object implements Serializable, Cloneable
xOd
, yOd
), by the origin's integer or pixel coordinates
(xOp
, yOp
) and one pixel's length (as double) in both
x and y orientation (xL1p
, yL1p
).xL1p
and yL1p
must both be positive and greater than
1e-12. On applying the transformation the factor yL1p
will be
used negative to hide the fact Java graphic's y pixel coordinates growing
the wrong way (downwards).Paintable
,
Serialized FormModifier and Type | Field and Description |
---|---|
int |
hashValue
The hash code of this transformation.
|
double |
xL1p
The length of one x pixel as double value.
|
double |
xL1pInv
The length of (double) 1.0 in x pixels as double value.
|
double |
xOd
The x origin as double.
|
int |
xOp
The x origin in pixel.
|
double |
yL1p
The length of one y pixel as double value.
|
double |
yL1pInv
The length of (double) 1.0 in y pixels as double value.
|
double |
yOd
The y origin as double.
|
int |
yOp
The y origin in pixel.
|
Constructor and Description |
---|
PixDoubTrans(int xOp,
int yOp,
double xL1p,
double yL1p)
Make a transformation.
|
PixDoubTrans(int xOp,
int yOp,
double xL1p,
double yL1p,
double xOd,
double yOd)
Make a transformation.
|
PixDoubTrans(int xOp,
int yOp,
int xL1,
int yL1)
Make a transformation.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
A "copy" of this object.
|
boolean |
equals(Object other)
Compare to another PixDoubTrans object.
|
int |
hashCode() |
Complex |
pixComplex(ConstIntPair p)
Make a Complex from pixel coordinates given as Point (X, Y).
|
Complex |
pixComplex(int xP,
int yP)
Make a Complex from pixel coordinates (X, Y).
|
String |
toString()
State as String.
|
StringBuffer |
toString(StringBuffer bastel)
State as String.
|
double |
xD(int xP)
Make the double coordinate value from the pixel value (X).
|
int |
xPix(double x)
Make the pixel value from the double coordinate value (X).
|
IntPairFix |
xyPix(double x,
double y)
Make a pixel point from the double coordinate values (X, Y).
|
double |
yD(int yP)
Make the double coordinate value from the pixel value (Y).
|
int |
yPix(double y)
Make the pixel value from the double coordinate value (Y).
|
public final int xOp
public final int yOp
public final double xOd
public final double yOd
public final double xL1p
public final double yL1p
public final double xL1pInv
public final double yL1pInv
public final int hashValue
public PixDoubTrans(int xOp, int yOp, double xL1p, double yL1p, double xOd, double yOd)
IllegalArgumentException
.xOp
- X origin in pixelyOp
- Y origin in pixelxL1p
- X length of a pixel as double (>=+1e-12 !)yL1p
- Y -length of a pixel as double (>=+1e-12 !)xOd
- X origin in doubleyOd
- Y origin in doublepublic PixDoubTrans(int xOp, int yOp, double xL1p, double yL1p)
IllegalArgumentException
.xOp
- X origin in pixelyOp
- Y origin in pixelxL1p
- X length of a pixel as double (>=+1e-12 !)yL1p
- Y -length of a pixel as double (>=+1e-12 !)public PixDoubTrans(int xOp, int yOp, int xL1, int yL1)
IllegalArgumentException
.xOp
- X origin in pixelyOp
- Y origin in pixelxL1
- the length of (double) 1.0 in x pixels (>=1!)yL1
- the length of (double) 1.0 in x pixels (>=1!)public StringBuffer toString(StringBuffer bastel)
bastel
- StringBuffer to be appended to; if null, it will be made
with starting capacity 66public String toString()
toString(null).toString()
.public final boolean equals(Object other)
public Object clone()
PixDoubTrans
objects are immutable cloning them makes no sense.
This method hence returns the original (this) object.public int xPix(double x)
public int yPix(double y)
public IntPairFix xyPix(double x, double y)
public double xD(int xP)
public double yD(int yP)
public Complex pixComplex(int xP, int yP)
Complex
object.xD()
,
yD()
,
Complex.make()
public Complex pixComplex(ConstIntPair p)
Complex
object.p
- point in pixels (must not be null)xD()
,
yD()
,
Complex.make()