tft lcd touch is inverted y is x and x is y

I m using SPFD5408 tft lcd, i am using this library https://github.com/JoaoLopesF/SPFD5408 by JoaoLopesF but my touch is inverted I am using paint example when i draw horizontally it draws vertically. Plz help

Swap the X and Y pin number in the sketch. Change this part:

#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

to this:

#define XM A1  // must be an analog pin, use "An" notation!
#define YP A2  // must be an analog pin, use "An" notation!
#define XP 7   // can be a digital pin
#define YM 6   // can be a digital pin