2019-03-06 12:15 AM
HI,I'm New to C++,and I'm trying to using TouchGFX for my interface UI Demo,Now I'm trying to creat a Text Wigdet total by code,and make is to supprot TFT files,other than use the Designer to draw and creat a string list.That is,write someting like "printf" and then it show message on the LCD screen.
How could I start to handle this work!? Thanks.
if I use my own tag ,it will auto removed by designer,Wish for you help!
2019-03-06 01:39 AM
hello!
redefine the function int fputc (int c, FILE * stream) declared in stdio.h to retarget the prinf output, like this
int fputc (int c, FILE * stream)
{
//your code to print a character to screen goes here
return c;
}
fputs called by printf fuction internaly.
2019-03-06 02:01 AM
Thank you!
Actually what I wanna know is how to use the touchGFX function interface about Load Fonts.I'm confused about this .Now I have used the reload functions in (LCD.hpp) to draw dots or Lines.
I just use the designer to place the text area,then the TouchGFX designer 4.10 creat C++ code to show the font in lcd screen.
I want to use my HAL fun then I create touchgfx::myTexts, someting like class touchgfx::Texts, then I change the font array point to place order by unicode in *.TFT files,but it didn't work.cause the HAL fun aways call the touchgfx::Texts::setLanguage,other than my function inter face
the func I want to repass my parameters is the following one:
void registerTypedTextDatabase(const TypedTextData* data, const Font* const* f, const uint16_t n)
I don't kown weather I have make it cleare.Any how ,thank you for your time!
2020-03-10 11:54 AM
Hi Cyneer
Did you know how create a text by code? Im creating an application for stm32f746-disco board(by now) that works as coprocessor so the final screen isn´t defined, it is created in real time by uart commands so i need to add text or image or figures in real time, I have resolved image by array of image objects but text i can´t yet. Any advise?
Best Regards