56
56
#include " res/qwiic_resdef.h"
57
57
58
58
// RECT!
59
- struct QwRect
60
- {
59
+ struct QwRect {
61
60
uint16_t x;
62
61
uint16_t y;
63
62
uint16_t width;
@@ -91,8 +90,7 @@ extern const uint8_t byte_bits[8];
91
90
//
92
91
// Seperated out to enable easy vtable access and method dispatch short circuiting
93
92
94
- class _QwIDraw
95
- {
93
+ class _QwIDraw {
96
94
97
95
// Pixel Methods
98
96
virtual void draw_pixel (uint8_t x, uint8_t y, uint8_t clr) {} // A subclass must implement this
@@ -125,8 +123,7 @@ typedef void (*QwDrawBitmapFn)(void *, uint8_t, uint8_t, uint8_t, uint8_t, uint8
125
123
typedef void (*QwDrawTextFn)(void *, uint8_t , uint8_t , const char *, uint8_t );
126
124
127
125
// Define the vtable struct for IDraw
128
- struct _QwIDraw_vtable
129
- {
126
+ struct _QwIDraw_vtable {
130
127
QwDrawPntFn draw_pixel;
131
128
QwDrawTwoPntFn draw_line;
132
129
QwDrawTwoPntFn draw_line_horz;
@@ -152,14 +149,12 @@ class QwGrBufferDevice : protected _QwIDraw
152
149
// Constructors
153
150
QwGrBufferDevice () : _currFont{nullptr } {};
154
151
QwGrBufferDevice (uint8_t width, uint8_t height) : QwGrBufferDevice(0 , 0 , width, height){};
155
- QwGrBufferDevice (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height)
156
- {
152
+ QwGrBufferDevice (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height){
157
153
set_viewport (x0, y0, width, height);
158
154
};
159
155
160
156
// Buffer location on the device
161
- void set_viewport (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height)
162
- {
157
+ void set_viewport (uint8_t x0, uint8_t y0, uint8_t width, uint8_t height){
163
158
_viewport.x = x0;
164
159
_viewport.y = y0;
165
160
_viewport.width = width;
0 commit comments