Files
G.U.L.L.S/include/ScanArrangement.h

24 lines
550 B
C++

#ifndef SCANARRANGEMENT_H
#define SCANARRANGEMENT_H
#include "ILEDArrangement.h"
class ScanArrangement : public ILEDArrangement {
public:
ScanArrangement(bool _isColumnScan) : isColumnScan(_isColumnScan) {}
virtual ~ScanArrangement() {}
int16_t XY(int16_t x, int16_t y, int16_t width, int16_t height) {
if(isColumnScan) {
return height * x + y;
} else {
return width * y + x;
}
}
private:
bool
isColumnScan;
};
#endif