@@ -328,10 +328,9 @@ class GFXcanvas1 : public Adafruit_GFX {
328328 bool getRawPixel (int16_t x, int16_t y) const ;
329329 void drawFastRawVLine (int16_t x, int16_t y, int16_t h, uint16_t color);
330330 void drawFastRawHLine (int16_t x, int16_t y, int16_t w, uint16_t color);
331+ uint8_t *buffer; // protected (no longer private) for subclass flexibility
331332
332333private:
333- uint8_t *buffer;
334-
335334#ifdef __AVR__
336335 // Bitmask tables of 0x80>>X and ~(0x80>>X), because X>>Y is slow on AVR
337336 static const uint8_t PROGMEM GFXsetBit[], GFXclrBit[];
@@ -360,9 +359,7 @@ class GFXcanvas8 : public Adafruit_GFX {
360359 uint8_t getRawPixel (int16_t x, int16_t y) const ;
361360 void drawFastRawVLine (int16_t x, int16_t y, int16_t h, uint16_t color);
362361 void drawFastRawHLine (int16_t x, int16_t y, int16_t w, uint16_t color);
363-
364- private:
365- uint8_t *buffer;
362+ uint8_t *buffer; // protected (no longer private) for subclass flexibility
366363};
367364
368365// / A GFX 16-bit canvas context for graphics
@@ -388,9 +385,7 @@ class GFXcanvas16 : public Adafruit_GFX {
388385 uint16_t getRawPixel (int16_t x, int16_t y) const ;
389386 void drawFastRawVLine (int16_t x, int16_t y, int16_t h, uint16_t color);
390387 void drawFastRawHLine (int16_t x, int16_t y, int16_t w, uint16_t color);
391-
392- private:
393- uint16_t *buffer;
388+ uint16_t *buffer; // protected (no longer private) for subclass flexibility
394389};
395390
396391#endif // _ADAFRUIT_GFX_H
0 commit comments