Permalink
Browse files

Fixed bit order reversal in drawBitmap()

  • Loading branch information...
1 parent 4c865e0 commit cf94144e993b5348d8d25a58b03dcf2c3eeaa2dd @PaintYourDragon PaintYourDragon committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Adafruit_GFX.cpp
View
@@ -339,7 +339,7 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y,
for(j=0; j<h; j++) {
for(i=0; i<w; i++ ) {
- if(pgm_read_byte(bitmap + j * byteWidth + i / 8) & _BV(i & 7)) {
+ if(pgm_read_byte(bitmap + j * byteWidth + i / 8) & (128 >> (i & 7))) {
drawPixel(x+i, y+j, color);
}
}

0 comments on commit cf94144

Please sign in to comment.