HI,
with Mikroe library for TFT SSD1963 controller,
there is command for change background and font color?
Example,
set white screen
print red font on yellow background?
Thanks
UM
TFT SSD1963 COLOR FONT and BACKGROUND
-
- Posts: 45
- Joined: 06 Feb 2018 11:48
- Contact:
TFT SSD1963 COLOR FONT and BACKGROUND
Umberto Italy
- filip.grujcic
- Posts: 822
- Joined: 14 May 2018 08:34
Re: TFT SSD1963 COLOR FONT and BACKGROUND
Hi Umberto,
Yes, there are commands for changing background and font colour.
Don't forget to initialize the TFT controller previously using
TFT_Init_SSD1963_8bit( 320, 240 );
Best regards,
Yes, there are commands for changing background and font colour.
Code: Select all
TFT_Fill_Screen( CL_YELLOW ); // For Yellow background colour
TFT_Set_Font( TFT_defaultFont, CL_RED, FO_HORIZONTAL ); // For Red font colour
TFT_Write_Text( "Some text", 10, 50 );
TFT_Init_SSD1963_8bit( 320, 240 );
Best regards,
Filip Grujcic
-
- Posts: 45
- Joined: 06 Feb 2018 11:48
- Contact:
Re: TFT SSD1963 COLOR FONT and BACKGROUND
filip.grujcic wrote:Hi Umberto,
Yes, there are commands for changing background and font colour.
Don't forget to initialize the TFT controller previously usingCode: Select all
TFT_Fill_Screen( CL_YELLOW ); // For Yellow background colour TFT_Set_Font( TFT_defaultFont, CL_RED, FO_HORIZONTAL ); // For Red font colour TFT_Write_Text( "Some text", 10, 50 );
TFT_Init_SSD1963_8bit( 320, 240 );
Best regards,
HI, but TFT_Fill_Screen... clear all display...
I must change only color in background of the text....
Thanks
Umberto Italy
- filip.grujcic
- Posts: 822
- Joined: 14 May 2018 08:34
Re: TFT SSD1963 COLOR FONT and BACKGROUND
Hi Umberto,
In that case you will want to create a rectangle on the same coordinates where your text is and change it's colour to whatever you like. For example:
Best regards,
In that case you will want to create a rectangle on the same coordinates where your text is and change it's colour to whatever you like. For example:
Code: Select all
TFT_Set_Pen( CL_WHITE, 1 );
TFT_Set_Brush( 1, CL_YELLOW, 0, 0, 0, 0 );
TFT_Rectangle( 90, 90, 160, 110);
Filip Grujcic
-
- Posts: 45
- Joined: 06 Feb 2018 11:48
- Contact:
Re: TFT SSD1963 COLOR FONT and BACKGROUND
write in two steps ... it becomes too slow, first delete and then rewrite?filip.grujcic wrote:Hi Umberto,
In that case you will want to create a rectangle on the same coordinates where your text is and change it's colour to whatever you like. For example:Best regards,Code: Select all
TFT_Set_Pen( CL_WHITE, 1 ); TFT_Set_Brush( 1, CL_YELLOW, 0, 0, 0, 0 ); TFT_Rectangle( 90, 90, 160, 110);
The controller ra8875 allows to write and delete at the same time the pixels of the unused font, it is much more performing and fast.
Can you modify the library driver so that when you print the font, unused pixels of the font size have the background color?
in practice if I use a 38 x 38 font, always write all 38 x 38 ..... thanks
Umberto Italy
- filip.grujcic
- Posts: 822
- Joined: 14 May 2018 08:34
Re: TFT SSD1963 COLOR FONT and BACKGROUND
Hello,
The mentioned controller is not supported in our TFT library, therefore we can't really modify it since other TFT controllers do not have same capabilities as RA8875. Our TFT library was made for generic and most common controllers. I advise you to consult the datasheet for RA8875 or to look up some examples online.
Best regards,
The mentioned controller is not supported in our TFT library, therefore we can't really modify it since other TFT controllers do not have same capabilities as RA8875. Our TFT library was made for generic and most common controllers. I advise you to consult the datasheet for RA8875 or to look up some examples online.
Best regards,
Filip Grujcic