Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jcckit.transformation
Class CartesianTransformation

    java.lang.Object
      jcckit.transformation.CartesianTransformation

All Implemented Interfaces:
  Transformation

public class CartesianTransformation
extends java.lang.Object
implements Transformation

Two-dimensional Cartesian transformation. The two independent transformations for the x-axis and the y-axis can be logarithmic from data coordinates to device-independent coordinates in order to realize diagrams with logarithmic scales.

Author:
  Franz-Josef Elmer

Constructor Summary
`CartesianTransformation(boolean xLogScale, boolean yLogScale, DataPoint dataPoint1, GraphPoint graphPoint1, DataPoint dataPoint2, GraphPoint graphPoint2)` Creates an instance from the specified reference points.

Method Summary
`DataPoint` | `transformToData(GraphPoint point)` Transforms a `GraphPoint` into a `DataPoint`.
`GraphPoint` | `transformToGraph(DataPoint point)` Transforms a `DataPoint` into a `GraphPoint`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CartesianTransformation

    public CartesianTransformation(boolean xLogScale,
                                   boolean yLogScale,
                                   DataPoint dataPoint1,
                                   GraphPoint graphPoint1,
                                   DataPoint dataPoint2,
                                   GraphPoint graphPoint2)

  Creates an instance from the specified reference points. Note, that the reference points must differ in x and y coordinates otherwise a transformation would not be possible.

Parameters:
  `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.
Throws:
  `java.lang.IllegalArgumentException` - if transformation in at least one of both directions is not possible.

Method Detail

### transformToGraph

    public GraphPoint transformToGraph(DataPoint point)

  Description copied from interface: `Transformation`
  Transforms a `DataPoint` into a `GraphPoint`.

  Specified by:
    `transformToGraph` in interface `Transformation`
  Parameters:
    `point` - A point in data coordinates.
  Returns:
    `point` tranformed into device-independent coordinates..

### transformToData

    public DataPoint transformToData(GraphPoint point)

  Description copied from interface: `Transformation`
  Transforms a `GraphPoint` into a `DataPoint`.

  Specified by:
    `transformToData` in interface `Transformation`
  Parameters:
    `point` - A point in device-independent coordinates..
  Returns:
    `point` tranformed into data coordinates.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD