Skip to content
Discussion options

You must be logged in to vote

It depends which font you are using. Most fonts allow a background colour to be specified. The setTextPadding() function can also be used to pad out the backgrounbd zone to a specified width in pixels. Some examples demonstrate this.

Example code:

  // Set text padding to 100 pixels wide area to over-write old values on screen
  tft.setTextPadding(100);
  tft.setTextColor(TFT_WHITE, TFT_BLUE);
  for (int i = 0; i <= 20; i++) {
    tft.drawFloat(i / 10.0, 1, xpos, ypos);
    delay (200);
  }

Replies: 1 comment 1 reply

Comment options

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

Answer selected by Bodmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants