Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Text painting issue with 'const char*'
Text painting issue with 'const char*' [message #58870] |
Tue, 20 September 2022 17:30  |
Tom1
Messages: 1151 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
It seems that painting text with Painter::Text no longer works with 'const char*', but does with 'String'.
painter.Text(10,10,"Some text",StdFont(12)).Fill(Black()); // Does not work anymore
painter.Text(10,30,String("Some text in String"),StdFont(12)).Fill(Black()); // Does work
Found out that it now requires adding number of characters to draw. Previously it printed a null terminated string correctly without defining the number of characters to print.
Best regards,
Tom
|
|
|
Re: Text painting issue with 'const char*' [message #59332 is a reply to message #58870] |
Sat, 17 December 2022 08:48  |
 |
mirek
Messages: 13849 Registered: November 2005
|
Ultimate Member |
|
|
Tom1 wrote on Tue, 20 September 2022 17:30Hi,
It seems that painting text with Painter::Text no longer works with 'const char*', but does with 'String'.
painter.Text(10,10,"Some text",StdFont(12)).Fill(Black()); // Does not work anymore
painter.Text(10,30,String("Some text in String"),StdFont(12)).Fill(Black()); // Does work
Found out that it now requires adding number of characters to draw. Previously it printed a null terminated string correctly without defining the number of characters to print.
Best regards,
Tom
Thanks, should be now fixed.
|
|
|
Goto Forum:
Current Time: Sat Mar 25 08:11:17 CET 2023
Total time taken to generate the page: 0.03009 seconds
|