@@ -718,16 +718,16 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
718
718
int16_t w, int16_t h, uint16_t color) {
719
719
720
720
int16_t byteWidth = (w + 7 ) / 8 ; // Bitmap scanline pad = whole byte
721
- uint8_t byte = 0 ;
721
+ uint8_t b = 0 ;
722
722
723
723
startWrite ();
724
724
for (int16_t j = 0 ; j < h; j++, y++) {
725
725
for (int16_t i = 0 ; i < w; i++) {
726
726
if (i & 7 )
727
- byte <<= 1 ;
727
+ b <<= 1 ;
728
728
else
729
- byte = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
730
- if (byte & 0x80 )
729
+ b = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
730
+ if (b & 0x80 )
731
731
writePixel (x + i, y, color);
732
732
}
733
733
}
@@ -753,16 +753,16 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
753
753
uint16_t bg) {
754
754
755
755
int16_t byteWidth = (w + 7 ) / 8 ; // Bitmap scanline pad = whole byte
756
- uint8_t byte = 0 ;
756
+ uint8_t b = 0 ;
757
757
758
758
startWrite ();
759
759
for (int16_t j = 0 ; j < h; j++, y++) {
760
760
for (int16_t i = 0 ; i < w; i++) {
761
761
if (i & 7 )
762
- byte <<= 1 ;
762
+ b <<= 1 ;
763
763
else
764
- byte = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
765
- writePixel (x + i, y, (byte & 0x80 ) ? color : bg);
764
+ b = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
765
+ writePixel (x + i, y, (b & 0x80 ) ? color : bg);
766
766
}
767
767
}
768
768
endWrite ();
@@ -784,16 +784,16 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w,
784
784
int16_t h, uint16_t color) {
785
785
786
786
int16_t byteWidth = (w + 7 ) / 8 ; // Bitmap scanline pad = whole byte
787
- uint8_t byte = 0 ;
787
+ uint8_t b = 0 ;
788
788
789
789
startWrite ();
790
790
for (int16_t j = 0 ; j < h; j++, y++) {
791
791
for (int16_t i = 0 ; i < w; i++) {
792
792
if (i & 7 )
793
- byte <<= 1 ;
793
+ b <<= 1 ;
794
794
else
795
- byte = bitmap[j * byteWidth + i / 8 ];
796
- if (byte & 0x80 )
795
+ b = bitmap[j * byteWidth + i / 8 ];
796
+ if (b & 0x80 )
797
797
writePixel (x + i, y, color);
798
798
}
799
799
}
@@ -818,16 +818,16 @@ void Adafruit_GFX::drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w,
818
818
int16_t h, uint16_t color, uint16_t bg) {
819
819
820
820
int16_t byteWidth = (w + 7 ) / 8 ; // Bitmap scanline pad = whole byte
821
- uint8_t byte = 0 ;
821
+ uint8_t b = 0 ;
822
822
823
823
startWrite ();
824
824
for (int16_t j = 0 ; j < h; j++, y++) {
825
825
for (int16_t i = 0 ; i < w; i++) {
826
826
if (i & 7 )
827
- byte <<= 1 ;
827
+ b <<= 1 ;
828
828
else
829
- byte = bitmap[j * byteWidth + i / 8 ];
830
- writePixel (x + i, y, (byte & 0x80 ) ? color : bg);
829
+ b = bitmap[j * byteWidth + i / 8 ];
830
+ writePixel (x + i, y, (b & 0x80 ) ? color : bg);
831
831
}
832
832
}
833
833
endWrite ();
@@ -852,18 +852,18 @@ void Adafruit_GFX::drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
852
852
int16_t w, int16_t h, uint16_t color) {
853
853
854
854
int16_t byteWidth = (w + 7 ) / 8 ; // Bitmap scanline pad = whole byte
855
- uint8_t byte = 0 ;
855
+ uint8_t b = 0 ;
856
856
857
857
startWrite ();
858
858
for (int16_t j = 0 ; j < h; j++, y++) {
859
859
for (int16_t i = 0 ; i < w; i++) {
860
860
if (i & 7 )
861
- byte >>= 1 ;
861
+ b >>= 1 ;
862
862
else
863
- byte = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
863
+ b = pgm_read_byte (&bitmap[j * byteWidth + i / 8 ]);
864
864
// Nearly identical to drawBitmap(), only the bit order
865
865
// is reversed here (left-to-right = LSB to MSB):
866
- if (byte & 0x01 )
866
+ if (b & 0x01 )
867
867
writePixel (x + i, y, color);
868
868
}
869
869
}
@@ -937,15 +937,15 @@ void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
937
937
const uint8_t mask[], int16_t w,
938
938
int16_t h) {
939
939
int16_t bw = (w + 7 ) / 8 ; // Bitmask scanline pad = whole byte
940
- uint8_t byte = 0 ;
940
+ uint8_t b = 0 ;
941
941
startWrite ();
942
942
for (int16_t j = 0 ; j < h; j++, y++) {
943
943
for (int16_t i = 0 ; i < w; i++) {
944
944
if (i & 7 )
945
- byte <<= 1 ;
945
+ b <<= 1 ;
946
946
else
947
- byte = pgm_read_byte (&mask[j * bw + i / 8 ]);
948
- if (byte & 0x80 ) {
947
+ b = pgm_read_byte (&mask[j * bw + i / 8 ]);
948
+ if (b & 0x80 ) {
949
949
writePixel (x + i, y, (uint8_t )pgm_read_byte (&bitmap[j * w + i]));
950
950
}
951
951
}
@@ -971,15 +971,15 @@ void Adafruit_GFX::drawGrayscaleBitmap(int16_t x, int16_t y,
971
971
void Adafruit_GFX::drawGrayscaleBitmap (int16_t x, int16_t y, uint8_t *bitmap,
972
972
uint8_t *mask, int16_t w, int16_t h) {
973
973
int16_t bw = (w + 7 ) / 8 ; // Bitmask scanline pad = whole byte
974
- uint8_t byte = 0 ;
974
+ uint8_t b = 0 ;
975
975
startWrite ();
976
976
for (int16_t j = 0 ; j < h; j++, y++) {
977
977
for (int16_t i = 0 ; i < w; i++) {
978
978
if (i & 7 )
979
- byte <<= 1 ;
979
+ b <<= 1 ;
980
980
else
981
- byte = mask[j * bw + i / 8 ];
982
- if (byte & 0x80 ) {
981
+ b = mask[j * bw + i / 8 ];
982
+ if (b & 0x80 ) {
983
983
writePixel (x + i, y, bitmap[j * w + i]);
984
984
}
985
985
}
@@ -1048,15 +1048,15 @@ void Adafruit_GFX::drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap,
1048
1048
void Adafruit_GFX::drawRGBBitmap (int16_t x, int16_t y, const uint16_t bitmap[],
1049
1049
const uint8_t mask[], int16_t w, int16_t h) {
1050
1050
int16_t bw = (w + 7 ) / 8 ; // Bitmask scanline pad = whole byte
1051
- uint8_t byte = 0 ;
1051
+ uint8_t b = 0 ;
1052
1052
startWrite ();
1053
1053
for (int16_t j = 0 ; j < h; j++, y++) {
1054
1054
for (int16_t i = 0 ; i < w; i++) {
1055
1055
if (i & 7 )
1056
- byte <<= 1 ;
1056
+ b <<= 1 ;
1057
1057
else
1058
- byte = pgm_read_byte (&mask[j * bw + i / 8 ]);
1059
- if (byte & 0x80 ) {
1058
+ b = pgm_read_byte (&mask[j * bw + i / 8 ]);
1059
+ if (b & 0x80 ) {
1060
1060
writePixel (x + i, y, pgm_read_word (&bitmap[j * w + i]));
1061
1061
}
1062
1062
}
@@ -1081,15 +1081,15 @@ void Adafruit_GFX::drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[],
1081
1081
void Adafruit_GFX::drawRGBBitmap (int16_t x, int16_t y, uint16_t *bitmap,
1082
1082
uint8_t *mask, int16_t w, int16_t h) {
1083
1083
int16_t bw = (w + 7 ) / 8 ; // Bitmask scanline pad = whole byte
1084
- uint8_t byte = 0 ;
1084
+ uint8_t b = 0 ;
1085
1085
startWrite ();
1086
1086
for (int16_t j = 0 ; j < h; j++, y++) {
1087
1087
for (int16_t i = 0 ; i < w; i++) {
1088
1088
if (i & 7 )
1089
- byte <<= 1 ;
1089
+ b <<= 1 ;
1090
1090
else
1091
- byte = mask[j * bw + i / 8 ];
1092
- if (byte & 0x80 ) {
1091
+ b = mask[j * bw + i / 8 ];
1092
+ if (b & 0x80 ) {
1093
1093
writePixel (x + i, y, bitmap[j * w + i]);
1094
1094
}
1095
1095
}
0 commit comments