mirror of https://github.com/MLXXXp/Arduboy2.git
Add constructors to Rect
This commit is contained in:
parent
54d47ec04e
commit
bc63e39931
|
@ -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 ==========
|
||||
//========================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue