是否可以做到精灵对比以加快推送速度 #2471
Unanswered
MR-XieXuan
asked this question in
Q&A - Sprites
Replies: 3 comments 7 replies
-
There is a Sprite in the program, and only this Sprite will be manipulated for actual screen operations. All the other sprites make changes to this Sprite. When pushing this Sprite, only push the modified part, not the unmodified part. To improve push speed. |
Beta Was this translation helpful? Give feedback.
2 replies
-
OK What is the question? |
Beta Was this translation helpful? Give feedback.
0 replies
-
当我把精灵推向精灵时会出现问题。 #include <TFT_eSPI.h>
#include <SPI.h>
#define BUG true
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite img = TFT_eSprite(&tft);
TFT_eSprite img2 = TFT_eSprite(&img);
void setup() {
tft.init();
tft.setRotation(0);
tft.fillScreen(TFT_BLUE);
img.createSprite(100, 100);
img.fillSprite(TFT_RED);
#if BUG
img2.createSprite(50, 50);
img2.fillSprite(TFT_GREEN);
img2.pushSprite(0,0);
#endif
img.pushSprite(0,0);
}
void loop() {
} |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
在程序中有一个精灵,对实际屏幕操作只会操作这一个精灵。
其他的精灵都是对这个精灵做修改。
推送这只精灵的时候只推送修改的部分,而不推送没有修改的部分。以提高推送速度。
Beta Was this translation helpful? Give feedback.
All reactions