Problem with Sprite & pushimage const convertion #2877
Unanswered
ghostofperditi0n
asked this question in
Q&A - Sprites
Replies: 2 comments
-
background.pushImage(62, 200, 16, 13, folder, TFT_WHITE); ok seem that problem is the trasparency TFT_WHITE. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The sprite class does not have a function to push an image with a transparent colour. This should work: background.pushImage(165, 200, 16, 13, set); When the sprite is pushed to the screen a 16 bit transparent colour can be specified. |
Beta Was this translation helpful? Give feedback.
0 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.
-
I'm having trouble pushing multiple images to sprites with esp32 on gc9a01 round display.
In particular, if I use tft.pushimage / push.rotate only with image called "tline" everything works;
Problem appear only on:
background.pushImage(165, 200, 16, 13, set, TFT_WHITE);
background.pushImage(62, 200, 16, 13, folder, TFT_WHITE);
giving:
Compilation error: _invalid conversion from 'const short unsigned int*' to 'uint16_t*' {aka 'short unsigned int* '} [-fpermissive]
Problem disappear drawing on tft using:
tft.pushImage(165, 200, 16, 13, set, TFT_WHITE);
tft.pushImage(62, 200, 16, 13, folder, TFT_WHITE);
In pics.h i upload in flash memory images converted with rinky dink like:
#if defined(AVR)
#include <avr/pgmspace.h>
#elif defined(PIC32MX)
#define PROGMEM
#elif defined(arm)
#define PROGMEM
#endif
const unsigned short thline[3360] PROGMEM={ 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, ecc ecc ecc ecc }
const unsigned short set[208] PROGMEM={ 0xC618, 0xFFFF, 0xFFFF, ecc ecc ecc ecc }
const unsigned short folder[208] PROGMEM={ 0xC618, 0xC618, 0xC618, 0xC618, ecc ecc ecc ecc }
I paste code:
Any solutions / ideas ?
p.s. i was obliged to use :
Beta Was this translation helpful? Give feedback.
All reactions