physicon.graphLib
Class LinearGraphContext

java.lang.Object
  |
  +--physicon.graphLib.GraphContextBase
        |
        +--physicon.graphLib.LinearGraphContext

public final class LinearGraphContext
extends GraphContextBase

Represents linear point converter y axis - to up, x - to right

See Also:
GraphContextBase

Fields inherited from class physicon.graphLib.GraphContextBase
zeroPt
 
Constructor Summary
LinearGraphContext(int _x, int _y)
          Constructor
 
Method Summary
 double gl2llX(double l)
          Converts the given global length to the local length
 double gl2llY(double l)
           
 double gp2lpX(int _x, int _y)
          Converts the given global point to the local point
 double gp2lpY(int _x, int _y)
           
 double ll2glX(double l)
           
 double ll2glY(double l)
           
 int lp2gpX(double _x, double _y)
          Converts the given local point to the global point
 int lp2gpY(double _x, double _y)
           
 void scale(double _xRatio, double _yRatio)
          Scales the picture by the given ratio
 void setScale(double lxINgx, double lyINgy)
           
 
Methods inherited from class physicon.graphLib.GraphContextBase
getOffset, getZeroPoint, gp2lp, lp2gp, lpINgpX, lpINgpY, setOffset, setZeroPoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearGraphContext

public LinearGraphContext(int _x,
                          int _y)
Constructor
Parameters:
_x - - the x coordinate of the reference point of local coordinate system in global coordinate system
_y - - the y coordinate of the reference point of local coordinate system in global coordinate system
Method Detail

gl2llX

public double gl2llX(double l)
Converts the given global length to the local length

ll2glX

public double ll2glX(double l)

gl2llY

public double gl2llY(double l)

ll2glY

public double ll2glY(double l)

gp2lpX

public double gp2lpX(int _x,
                     int _y)
Converts the given global point to the local point
Parameters:
_pt - - the given point in the global coordinate system
Overrides:
gp2lpX in class GraphContextBase

gp2lpY

public double gp2lpY(int _x,
                     int _y)
Overrides:
gp2lpY in class GraphContextBase

lp2gpX

public int lp2gpX(double _x,
                  double _y)
Converts the given local point to the global point
Parameters:
_pt - - the given point in the local coordinate system
Overrides:
lp2gpX in class GraphContextBase

lp2gpY

public int lp2gpY(double _x,
                  double _y)
Overrides:
lp2gpY in class GraphContextBase

scale

public void scale(double _xRatio,
                  double _yRatio)
Scales the picture by the given ratio
Parameters:
_xRatio - - scaling ratio by the x axis
_yRatio - - scaling ratio by the y axis
Overrides:
scale in class GraphContextBase

setScale

public void setScale(double lxINgx,
                     double lyINgy)
Overrides:
setScale in class GraphContextBase