26 #ifndef __Scanline_hh__
27 #define __Scanline_hh__
29 #include <bias_config.h>
30 #include "Bresenham.hh"
52 inline Scanline(
const int start[2],
const int end[2],
const int epsilon);
54 inline Scanline(
const unsigned int start[2],
const unsigned int end[2],
55 const unsigned int epsilon);
57 inline Scanline(
const double start[2],
const double end[2],
58 const double epsilon);
60 inline void Init(
const int start[2],
const int end[2],
const int epsilon);
62 inline void Init(
const unsigned int start[2],
const unsigned int end[2],
63 const unsigned int epsilon)
64 {
Init((
int *)start, (
int *)end, (
int)epsilon); };
66 inline void Init(
const double start[2],
const double end[2],
69 inline bool GetNext(
int next[2]);
72 {
return GetNext((
int *)next); };
74 inline bool GetNext(
double next[2]);
89 {
Init(start, end, epsilon); }
92 const unsigned int epsilon)
93 {
Init(start, end, epsilon); }
97 {
Init(start, end, epsilon); }
103 BIASERR(
"Epsilon should be greater or equal to zero!");
123 BIASERR(
"Epsilon should be greater or equal to zero!");
139 BIASERR(
"call Init befor GetNext");
171 int inext[2] = { 0, 0 };
173 next[0]=(double)inext[0] +
_dDx;
174 next[1]=(double)inext[1] +
_dDy;
181 #endif // __Scanline_hh__
void InverseTransform(enum TLineType &type, const T &Transformedx, const T &Transformedy, T &Originalx, T &Originaly)
executes the inverse transformation to the above
int _iTransformedCurrent[2]
EightWaySymmetry< int > _iSym
Class for scanning a region given by a line and a distance ca.
int _iTransformedStart[2]
void Init(const int start[2], const int end[2], const int epsilon)
bool GetNext(int next[2])
Scans a line using Bresenhams integer arithmetic algorithm.
enum TLineType _eLineType
void Init(const int start[2], const int end[2])
void Init(const unsigned int start[2], const unsigned int end[2], const unsigned int epsilon)
int _iTransformedUpDown[2]
bool GetNext(unsigned int next[2])