25#ifndef ORIGIN_TRANSFORMS_H_
26#define ORIGIN_TRANSFORMS_H_
63 virtual long long int ToDisplay(
long long int aValue,
72 virtual long long int FromDisplay(
long long int aValue,
122 template<
class T>
inline static
126 T displayValue = aInternalValue;
129 if( aInvertAxis && (displayValue !=
static_cast<T
>(0)) )
130 displayValue = -displayValue;
136 template<
class T>
inline static
140 T internalValue = aDisplayValue;
143 if( aInvertAxis && (internalValue !=
static_cast<T
>(0)) )
144 internalValue = -internalValue;
146 return internalValue;
149 template<
class T>
inline static
154 T displayValue = aInternalValue;
157 displayValue -= aUserOrigin;
160 if( aInvertAxis && (displayValue !=
static_cast<T
>(0)) )
161 displayValue = -displayValue;
166 template<
class T>
inline static
171 T internalValue = aDisplayValue;
174 if( aInvertAxis && (internalValue !=
static_cast<T
>(0)) )
175 internalValue = -internalValue;
178 internalValue += aUserOrigin;
180 return internalValue;