| 123456789101112131415161718192021222324 |
- #pragma once
- // Minimal substitute for the real Adafruit GFX Library.
- // Rotation is always 0 (esphome rotates before gxepd2 sees the image).
- #include <cstdint>
- class Adafruit_GFX {
- public:
- Adafruit_GFX(int16_t w, int16_t h) : WIDTH(w), HEIGHT(h), width_(w), height_(h) {}
- virtual ~Adafruit_GFX() = default;
- int16_t width() const { return this->width_; }
- int16_t height() const { return this->height_; }
- uint8_t getRotation() const { return this->rotation_; }
- void setRotation(uint8_t r) { this->rotation_ = r % 4; }
- protected:
- const int16_t WIDTH;
- const int16_t HEIGHT;
- int16_t width_;
- int16_t height_;
- uint8_t rotation_{0};
- };
|