diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index f59c08c..5242b42 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -860,14 +860,14 @@ void TFT_eSPI::readRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *da /*************************************************************************************** -** Function name: push rectangle (for SPI Interface II i.e. IM [3:0] = "1101") +** Function name: push rectangle ** Description: push 565 pixel colours into a defined area ***************************************************************************************/ void TFT_eSPI::pushRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data) { - // Function deprecated, remains for backwards compatibility - // New pushImage() is better as it will crop partly off-screen image blocks + bool swap = _swapBytes; _swapBytes = false; pushImage(x, y, w, h, data); + _swapBytes = swap; } diff --git a/TFT_eSPI.h b/TFT_eSPI.h index a25100b..5558692 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -16,7 +16,7 @@ #ifndef _TFT_eSPIH_ #define _TFT_eSPIH_ -#define TFT_ESPI_VERSION "2.2.6" +#define TFT_ESPI_VERSION "2.2.7" /*************************************************************************************** ** Section 1: Load required header files @@ -450,7 +450,7 @@ class TFT_eSPI : public Print { // The next functions can be used as a pair to copy screen blocks (or horizontal/vertical lines) to another location // Read a block of pixels to a data buffer, buffer is 16 bit and the size must be at least w * h void readRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data); - // Write a block of pixels to the screen - this is a deprecated alternative to pushImage() + // Write a block of pixels to the screen which have been read by readRect() void pushRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data); // These are used to render images or sprites stored in RAM arrays (used by Sprite class for 16bpp Sprites) diff --git a/library.json b/library.json index 4a23f3f..cbfea7c 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "2.2.6", + "version": "2.2.7", "keywords": "Arduino, tft, ePaper, display, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486, ST7789, RM68140", "description": "A TFT and ePaper SPI graphics library with optimisation for ESP8266, ESP32 and STM32", "repository": diff --git a/library.properties b/library.properties index a2aaa4e..069b77d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=2.2.6 +version=2.2.7 author=Bodmer maintainer=Bodmer sentence=TFT graphics library for Arduino processors with performance optimisation for STM32, ESP8266 and ESP32