Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
Tom1
Messages: 1212
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 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 20 September 2022 17:30
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


Thanks, should be now fixed.
Previous Topic: 2 Buttons clicked
Next Topic: Single Pixel Wide Straight Lines
Goto Forum:
  


Current Time: Thu Mar 28 14:00:07 CET 2024

Total time taken to generate the page: 0.01091 seconds