Skip to content

flash version of pushImage with color map and transparency #883

Discussion options

You must be logged in to vote

There are suitable functions here. As follows:

           // These are used by Sprite class pushSprite() member function for 1, 4 and 8 bits per pixel (bpp) colours
           // They are not intended to be used with user sketches (but could be)
           // Set bpp8 true for 8bpp sprites, false otherwise. The cmap pointer must be specified for 4bpp
  void     pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t  *data, bool bpp8 = true, uint16_t *cmap = nullptr);
  void     pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t  *data, uint8_t  transparent, bool bpp8 = true, uint16_t *cmap = nullptr);

You would have to cast the pointer to a uint8_t* type to use them. On…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ygator
Comment options

Answer selected by ygator
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment