TFT SSD1963 COLOR FONT and BACKGROUND

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
umbertomori
Posts: 45
Joined: 06 Feb 2018 11:48
Contact:

TFT SSD1963 COLOR FONT and BACKGROUND

#1 Post by umbertomori » 11 May 2018 16:45

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

Umberto Italy

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: TFT SSD1963 COLOR FONT and BACKGROUND

#2 Post by filip.grujcic » 14 May 2018 13:38

Hi Umberto,

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 );
Don't forget to initialize the TFT controller previously using

TFT_Init_SSD1963_8bit( 320, 240 );

Best regards,
Filip Grujcic

umbertomori
Posts: 45
Joined: 06 Feb 2018 11:48
Contact:

Re: TFT SSD1963 COLOR FONT and BACKGROUND

#3 Post by umbertomori » 16 May 2018 10:18

filip.grujcic wrote:Hi Umberto,

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 );
Don't forget to initialize the TFT controller previously using

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

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: TFT SSD1963 COLOR FONT and BACKGROUND

#4 Post by filip.grujcic » 16 May 2018 11:51

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:

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);
Best regards,
Filip Grujcic

umbertomori
Posts: 45
Joined: 06 Feb 2018 11:48
Contact:

Re: TFT SSD1963 COLOR FONT and BACKGROUND

#5 Post by umbertomori » 17 May 2018 09:06

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:

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);
Best regards,
write in two steps ... it becomes too slow, first delete and then rewrite?
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

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: TFT SSD1963 COLOR FONT and BACKGROUND

#6 Post by filip.grujcic » 17 May 2018 14:05

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,
Filip Grujcic

Post Reply

Return to “PIC PRO Compilers”