Hello,
I'm working with ESP32, ST7735 and TFT_eSPI library
There are 2 sprites, 1 is the main with text background, 1 is the 'popup' with triangle.
I want to draw 1 filled red triangle and draw another filled yellow triangle after 1 second at the same place (with different size and transparent background)
The problem is, when I draw the yellow triangle, the remaining red is still there as below picture:

So I fixed it by, push the main sprite to clear all, and then draw the yellow. This way works fine but there is a fast flicker effect due to main sprite is pushed out. Imagine the flow is as below:
Push main sprite => Push popup sprite with RED => push main sprite to clear (flicker here) => Push popup sprite with YELLOW
Is there another way to do it without flicker effect? Thank you
#define WIDTH 128
#define HEIGHT 128
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite spr_main = TFT_eSprite(&tft);
TFT_eSprite spr_popup = TFT_eSprite(&tft);
void setup()
{
tft.init();
spr_main.createSprite(WIDTH, HEIGHT);
spr_main.setTextWrap(true);
spr_main.setCursor(0, 0);
spr_main.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum");
spr_main.pushSprite(0, 0);
delay(1000);
spr_popup.createSprite(50, 50);
spr_popup.fillScreen(TFT_TRANSPARENT);
spr_popup.fillTriangle(25, 0, 0, 49, 49, 49, TFT_RED);
spr_popup.pushSprite(20, 20, TFT_TRANSPARENT);
delay(1000);
spr_popup.fillScreen(TFT_TRANSPARENT);
spr_popup.fillTriangle(20, 0, 0, 49, 49, 49, TFT_YELLOW);
// spr_main.pushSprite(0, 0); //Fast flicker effect here
spr_popup.pushSprite(20, 20, TFT_TRANSPARENT);
}
void loop(void){}