Loadbitmap in full rotations 0,90,180,270

i have converted 2 const unsigned uint16 progmen 1 for corner 2 for edge (uno cant handle 3 so i wanna rotate them) but i failed i try 25 times

void drawBitmap(int x, int y, int sx, int sy, uint16_t *data)
{
 int tc = 0;
 for(int Y = 0; Y < sy; Y++)
 {
  for(int X = 0; X < sx; X++)
  {
   tft.drawPixel(X+x, Y+y, pgm_read_word(&data[tc]));
   if(tc < (sx*sy)) tc++;
  }
 }

where is your rotation in the code?

all fail

do you try this?

tft.drawPixel( Y+y, X+x, pgm_read_word(&data[tc]));

thx

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.