o Fix off-by-one for canvas size.

This commit is contained in:
Henner Zeller 2014-09-11 06:41:30 +00:00
parent a1f4e6dde7
commit 52178a0ec5

View file

@ -47,7 +47,7 @@ public:
virtual int height() const { return 64; }
virtual void SetPixel(int x, int y,
uint8_t red, uint8_t green, uint8_t blue) {
if (x < 0 || x > width() || y < 0 || y > height()) return;
if (x < 0 || x >= width() || y < 0 || y >= height()) return;
// We have up to column 64 one direction, then folding around. Lets map
if (y > 31) {
x = 127 - x;