45 operator bool()
const ;
92 Scaler(
int dfirst ,
int dsecond ) ;
108 inline Gr::ScalerImp::ScalerImp(
int dfirst ,
int dsecond ) : dfast(dfirst) , dslow(dsecond) , fast(0) , slow(0) , e(2*dslow-dfast) {}
109 inline Gr::ScalerImp::operator bool()
const {
return fast < dfast ; }
115 inline Gr::Scaler::Scaler(
int dfirst ,
int dsecond ) :
ScalerImp(dfirst>dsecond?dfirst:dsecond,dfirst>dsecond?dsecond:dfirst) , swap(!(dfirst>dsecond)) {}
int first() const
Returns the current value in the first range.
bool operator!() const
Returns false if the current iteration position is still in range.
A class that allows for iterating over one integer range while accessing values from another...
int b() const
Returns the calculated value in the second range.
Scaler(int dfirst, int dsecond)
Constructor for iterating over the first range while calculating scaled values in the second...
ScalerImp(int dfirst, int dsecond)
Constructor for iterating over the first range.
int a() const
Returns the current value in the first range.
void operator++()
Moves on to the next position in the first range.
int second() const
Returns the corresponding value in the second range.
A base class for Gr::Scaler that does scaling using the Bresenham algorithm, but limited to the first...