public class CartesianTransformation extends Object implements Transformation
Constructor and Description |
---|
CartesianTransformation(boolean xLogScale,
boolean yLogScale,
DataPoint dataPoint1,
GraphPoint graphPoint1,
DataPoint dataPoint2,
GraphPoint graphPoint2)
Creates an instance from the specified reference points.
|
Modifier and Type | Method and Description |
---|---|
DataPoint |
transformToData(GraphPoint point)
Transforms a
GraphPoint into a DataPoint . |
GraphPoint |
transformToGraph(DataPoint point)
Transforms a
DataPoint into a GraphPoint . |
public CartesianTransformation(boolean xLogScale, boolean yLogScale, DataPoint dataPoint1, GraphPoint graphPoint1, DataPoint dataPoint2, GraphPoint graphPoint2)
xLogScale
- true if logarithmic x axis.yLogScale
- true if logarithmic y axis.dataPoint1
- First reference point in data coordinates.graphPoint1
- First reference point in device-independent
coordinates.dataPoint2
- Second reference point in data coordinates.graphPoint2
- Second reference point in device-independent
coordinates.IllegalArgumentException
- if transformation in at least
one of both directions is not possible.public GraphPoint transformToGraph(DataPoint point)
Transformation
DataPoint
into a GraphPoint
.transformToGraph
in interface Transformation
point
- A point in data coordinates.public DataPoint transformToData(GraphPoint point)
Transformation
GraphPoint
into a DataPoint
.transformToData
in interface Transformation
point
- A point in device-independent coordinates..Copyright © 2017. All Rights Reserved.