Re-running clang-format after the rebase

This commit is contained in:
Michael Kamprath 2020-06-05 11:00:20 -07:00
parent c53e9d24aa
commit 6791eaca01
No known key found for this signature in database
GPG Key ID: E5ED361AF3554882
2 changed files with 113 additions and 104 deletions

View File

@ -1738,8 +1738,10 @@ boolean Adafruit_GFX_Button::justReleased() {
#ifdef __AVR__ #ifdef __AVR__
// Bitmask tables of 0x80>>X and ~(0x80>>X), because X>>Y is slow on AVR // Bitmask tables of 0x80>>X and ~(0x80>>X), because X>>Y is slow on AVR
const uint8_t PROGMEM GFXcanvas1::GFXsetBit[] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; const uint8_t PROGMEM GFXcanvas1::GFXsetBit[] = {0x80, 0x40, 0x20, 0x10,
const uint8_t PROGMEM GFXcanvas1::GFXclrBit[] = { 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE }; 0x08, 0x04, 0x02, 0x01};
const uint8_t PROGMEM GFXcanvas1::GFXclrBit[] = {0x7F, 0xBF, 0xDF, 0xEF,
0xF7, 0xFB, 0xFD, 0xFE};
#endif #endif
/**************************************************************************/ /**************************************************************************/
@ -1817,7 +1819,8 @@ void GFXcanvas1::drawPixel(int16_t x, int16_t y, uint16_t color) {
@brief Get the pixel color value at a given coordinate @brief Get the pixel color value at a given coordinate
@param x x coordinate @param x x coordinate
@param y y coordinate @param y y coordinate
@returns The desired pixel's binary color value, either 0x1 (on) or 0x0 (off) @returns The desired pixel's binary color value, either 0x1 (on) or 0x0
(off)
*/ */
/**********************************************************************/ /**********************************************************************/
bool GFXcanvas1::getPixel(int16_t x, int16_t y) const { bool GFXcanvas1::getPixel(int16_t x, int16_t y) const {
@ -1848,11 +1851,13 @@ bool GFXcanvas1::getPixel(int16_t x, int16_t y) const {
in physical coordinates. in physical coordinates.
@param x x coordinate @param x x coordinate
@param y y coordinate @param y y coordinate
@returns The desired pixel's binary color value, either 0x1 (on) or 0x0 (off) @returns The desired pixel's binary color value, either 0x1 (on) or 0x0
(off)
*/ */
/**********************************************************************/ /**********************************************************************/
bool GFXcanvas1::getRawPixel(int16_t x, int16_t y) const { bool GFXcanvas1::getRawPixel(int16_t x, int16_t y) const {
if((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT)) return 0; if ((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT))
return 0;
if (this->getBuffer()) { if (this->getBuffer()) {
uint8_t *buffer = this->getBuffer(); uint8_t *buffer = this->getBuffer();
uint8_t *ptr = &buffer[(x / 8) + y * ((WIDTH + 7) / 8)]; uint8_t *ptr = &buffer[(x / 8) + y * ((WIDTH + 7) / 8)];
@ -1866,8 +1871,6 @@ bool GFXcanvas1::getRawPixel(int16_t x, int16_t y) const {
return 0; return 0;
} }
/**************************************************************************/ /**************************************************************************/
/*! /*!
@brief Fill the framebuffer completely with one color @brief Fill the framebuffer completely with one color
@ -1980,14 +1983,14 @@ uint8_t GFXcanvas8::getPixel(int16_t x, int16_t y) const {
*/ */
/**********************************************************************/ /**********************************************************************/
uint8_t GFXcanvas8::getRawPixel(int16_t x, int16_t y) const { uint8_t GFXcanvas8::getRawPixel(int16_t x, int16_t y) const {
if((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT)) return 0; if ((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT))
return 0;
if (buffer) { if (buffer) {
return buffer[x + y * WIDTH]; return buffer[x + y * WIDTH];
} }
return 0; return 0;
} }
/**************************************************************************/ /**************************************************************************/
/*! /*!
@brief Fill the framebuffer completely with one color @brief Fill the framebuffer completely with one color
@ -2137,14 +2140,14 @@ uint16_t GFXcanvas16::getPixel(int16_t x, int16_t y) const {
*/ */
/**********************************************************************/ /**********************************************************************/
uint16_t GFXcanvas16::getRawPixel(int16_t x, int16_t y) const { uint16_t GFXcanvas16::getRawPixel(int16_t x, int16_t y) const {
if((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT)) return 0; if ((x < 0) || (y < 0) || (x >= WIDTH) || (y >= HEIGHT))
return 0;
if (buffer) { if (buffer) {
return buffer[x + y * WIDTH]; return buffer[x + y * WIDTH];
} }
return 0; return 0;
} }
/**************************************************************************/ /**************************************************************************/
/*! /*!
@brief Fill the framebuffer completely with one color @brief Fill the framebuffer completely with one color

View File

@ -318,8 +318,10 @@ public:
*/ */
/**********************************************************************/ /**********************************************************************/
uint8_t *getBuffer(void) const { return buffer; } uint8_t *getBuffer(void) const { return buffer; }
protected: protected:
bool getRawPixel(int16_t x, int16_t y) const; bool getRawPixel(int16_t x, int16_t y) const;
private: private:
uint8_t *buffer; uint8_t *buffer;
@ -345,8 +347,10 @@ public:
*/ */
/**********************************************************************/ /**********************************************************************/
uint8_t *getBuffer(void) const { return buffer; } uint8_t *getBuffer(void) const { return buffer; }
protected: protected:
uint8_t getRawPixel(int16_t x, int16_t y) const; uint8_t getRawPixel(int16_t x, int16_t y) const;
private: private:
uint8_t *buffer; uint8_t *buffer;
}; };
@ -367,8 +371,10 @@ public:
*/ */
/**********************************************************************/ /**********************************************************************/
uint16_t *getBuffer(void) const { return buffer; } uint16_t *getBuffer(void) const { return buffer; }
protected: protected:
uint16_t getRawPixel(int16_t x, int16_t y) const; uint16_t getRawPixel(int16_t x, int16_t y) const;
private: private:
uint16_t *buffer; uint16_t *buffer;
}; };