diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index 5d59b55..40869e7 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -8,6 +8,15 @@ #include "ab_logo.c" #include "glcdfont.c" +//================================ +//========== class Rect ========== +//================================ + +Rect::Rect(int16_t x, int16_t y, uint8_t width, uint8_t height) + : x(x), y(y), width(width), height(height) +{ +} + //======================================== //========== class Arduboy2Base ========== //======================================== diff --git a/src/Arduboy2.h b/src/Arduboy2.h index a445059..56b2fcc 100644 --- a/src/Arduboy2.h +++ b/src/Arduboy2.h @@ -103,6 +103,10 @@ struct Rect int16_t y; /**< The Y coordinate of the top left corner */ uint8_t width; /**< The width of the rectangle */ uint8_t height; /**< The height of the rectangle */ + + Rect() = default; /**< The default constructor */ + + Rect(int16_t x, int16_t y, uint8_t width, uint8_t height); /**< The fully initialising constructor */ }; /** \brief