dasher
Class CDasherViewSquare.Cymap

java.lang.Object
  extended by dasher.CDasherViewSquare.Cymap
Enclosing class:
CDasherViewSquare

protected class CDasherViewSquare.Cymap
extends java.lang.Object

Helper class which applies and unapplies the y-axis non-linearity.


Field Summary
protected  long m_Y1
          Compression factor
protected  long m_Y2
          Y co-ordinate above which to apply compression
protected  long m_Y3
          Y co-ordinate below which to apply compression
 
Constructor Summary
CDasherViewSquare.Cymap(long iScale)
          Calculates m_Y1, 2 and 3 based on the total length of the y axis and hard coded scaling factors which state that objects should be scaled down a factor of 4 when within 5% of the outer edges.
 
Method Summary
 long map(long y)
          Converts a y co-ordinate according to this schema
 long unmap(long ydash)
          Restores a y co-ordinate by unapplying non-linearity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Y1

protected long m_Y1
Compression factor


m_Y2

protected long m_Y2
Y co-ordinate above which to apply compression


m_Y3

protected long m_Y3
Y co-ordinate below which to apply compression

Constructor Detail

CDasherViewSquare.Cymap

public CDasherViewSquare.Cymap(long iScale)
Calculates m_Y1, 2 and 3 based on the total length of the y axis and hard coded scaling factors which state that objects should be scaled down a factor of 4 when within 5% of the outer edges.

Parameters:
iScale - Total y-axis length
Method Detail

map

public long map(long y)
Converts a y co-ordinate according to this schema

Parameters:
y - Raw y co-ordinate
Returns:
Converted y co-ordinate

unmap

public long unmap(long ydash)
Restores a y co-ordinate by unapplying non-linearity

Parameters:
ydash - Converted y co-ordinate
Returns:
Original, raw y co-ordinate