|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.UserToPixelTransform
public class UserToPixelTransform
An affine transform does not provide for logarithmic conversions so we need a more general conversion mechanism. This class contains an affine transform but can also contain other transform(s) so that we can support the logarithmic and other transformations.
Constructor Summary | |
---|---|
UserToPixelTransform()
|
|
UserToPixelTransform(AffineTransform affineT)
|
Method Summary | |
---|---|
AffineTransform |
getAffineTransform()
|
AffineTransform |
getAffineTransformWithTranslation()
Returns an AffineTransform for transforming user coordinates to pixel coordinates |
Point2D |
getTranslation()
Return the translation part of the transformation |
Transform<Double> |
getXTransform()
|
Transform<Double> |
getYTransform()
|
Point2D |
inverseTransform(Point2D src)
Transforms a pixel coordinate to a user coordinate |
void |
setAffineTransform(AffineTransform affineTransform)
|
void |
setTranslation(Double x,
Double y)
Specify the translation in user coordinates |
void |
setXTransform(InvertibleTransform<Double> transform)
|
void |
setYTransform(InvertibleTransform<Double> transform)
|
Point2D |
transform(Point2D src)
Transforms a user coordinate to a pixel coordinate |
Point2D |
transform(Point2D src,
Point2D dst)
Transforms a user coordinate to a pixel coordinate and puts the result into the supplied destination Point2D object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserToPixelTransform()
public UserToPixelTransform(AffineTransform affineT)
Method Detail |
---|
public AffineTransform getAffineTransform()
public void setAffineTransform(AffineTransform affineTransform)
public AffineTransform getAffineTransformWithTranslation()
Important: Do not use this method if you are dealing with time series values, as the size of values used for translation may cause overflow-type errors in calculations. This is especially true of the inverse transform.
public void setTranslation(Double x, Double y)
x
- the x offsety
- the y offsetpublic Point2D getTranslation()
public Transform<Double> getXTransform()
public void setXTransform(InvertibleTransform<Double> transform)
public Transform<Double> getYTransform()
public void setYTransform(InvertibleTransform<Double> transform)
public Point2D transform(Point2D src)
src
- the user coordinate
public Point2D transform(Point2D src, Point2D dst)
src
- the user coordinatedst
- object to receive the destination
public Point2D inverseTransform(Point2D src) throws NoninvertibleTransformException
src
- the source point in pixel coordinates
NoninvertibleTransformException
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |