File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,11 @@ POSSIBILITY OF SUCH DAMAGE.
3939 #define pgm_read_byte (addr ) (*(const unsigned char *)(addr))
4040#endif
4141
42- Adafruit_GFX::Adafruit_GFX (int16_t w, int16_t h) {
43- _width = WIDTH = w;
44- _height = HEIGHT = h;
42+ Adafruit_GFX::Adafruit_GFX (int16_t w, int16_t h):
43+ WIDTH(w), HEIGHT(h)
44+ {
45+ _width = WIDTH;
46+ _height = HEIGHT;
4547 rotation = 0 ;
4648 cursor_y = cursor_x = 0 ;
4749 textsize = 1 ;
Original file line number Diff line number Diff line change @@ -70,8 +70,9 @@ class Adafruit_GFX : public Print {
7070 uint8_t getRotation (void );
7171
7272 protected:
73+ const int16_t
74+ WIDTH, HEIGHT; // This is the 'raw' display w/h - never changes
7375 int16_t
74- WIDTH, HEIGHT, // This is the 'raw' display w/h - never changes
7576 _width, _height, // Display w/h as modified by current rotation
7677 cursor_x, cursor_y;
7778 uint16_t
You can’t perform that action at this time.
0 commit comments