31 #define GRAPHICS_DRAWING_REGISTER_LIST(XX) \
36 XX(penColor, Color, Color::White) \
37 XX(brushColor, Color, Color::Black) \
38 XX(penWidth, uint16_t, 1) \
39 XX(radius, uint16_t, 0) \
40 XX(startAngle, uint16_t, 0) \
41 XX(angle, int16_t, 0) \
42 XX(brushId, AssetID, 0) \
43 XX(penId, AssetID, 0) \
44 XX(textId, AssetID, 0) \
46 XX(length, uint16_t, 0xffff) \
47 XX(offset, uint16_t, 0) \
48 XX(style, FontStyles, 0) \
49 XX(fontId, AssetID, 0)
61 #define XX(name, type, def) type name{def};
82 return startAngle + angle;
85 template <
typename T>
void update(uint8_t index,
OpCode opcode, T value)
87 assert(index *
sizeof(T) <
sizeof(
Registers));
88 auto& reg =
reinterpret_cast<T*
>(
this)[index];
#define GRAPHICS_DRAWING_REGISTER_LIST(XX)
Definition: Registers.h:31
The String class.
Definition: WString.h:137
String toString(OpCode opcode)
OpCode
Definition: Registers.h:51
Definition: Registers.h:60
Point pt2() const
Definition: Registers.h:70
void update(uint8_t index, OpCode opcode, T value)
Definition: Registers.h:85
Rect rect() const
Definition: Registers.h:75
uint16_t endAngle() const
Definition: Registers.h:80
static String nameAt(uint8_t offset)
Point pt1() const
Definition: Registers.h:65
Location and size of rectangular area (x, y, w, h)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:287