Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Adafruit GFX Graphics Library -- Start Point as a Variable
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit GFX Graphics Library -- Start Point as a Variable

by AndrewsBrewing on Thu Aug 13, 2020 7:29 am

I'm working with the 3.5" TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket - HXD8357D using the Adafruit GFX Library.

tft.setCursor(x,y);

I can't find an align feather for the library, so I am doing some math to center something on the display. I saw that these numbers are int16_t, so this is what I am trying.

int16_t tabvalue = (14 - ((weatherdescription.length()) / 2));
tft.setCursor(tabvalue, 160);

It is not working. Does anyone know what I might be doing wrong?

Sincerely,
Eric

AndrewsBrewing
 
Posts: 4
Joined: Sun Dec 20, 2015 7:20 am

Please be positive and constructive with your questions and comments.