Page 1 of 1
Winapi DrawText on chart no longer use canvas settings
Posted: Tue Dec 19, 2017 1:20 pm
by 16580506
Hi,
Since i've upgrade my RAD from D2009 to XE10.1 and Teechart from 8.08 to 2017.10, DrawText function (from winapi unit) no longer use canvas settings as font color, size, etc...
Same function on TImage canvas works fine!
- TestTChartDrawFunction.png (65.07 KiB) Viewed 17941 times
Please find attached small project highlighting problem.
I use Delphi XE10.1 and TeeChart Pro VCL FMX Source Code 2017.20.
Thanks for your help
Anthony
Re: Winapi DrawText on chart no longer use canvas settings
Posted: Wed Dec 20, 2017 2:18 pm
by yeray
Hello Anthony,
It works as always if you switch back from GDIPlus to GDI:
Code: Select all
uses TeCanvas;
//...
Chart.Canvas:=TTeeCanvas3D.Create;
Re: Winapi DrawText on chart no longer use canvas settings
Posted: Thu Dec 21, 2017 3:07 pm
by 16580506
Ok thank, it works finein GDI mode!
Is it planned to fix problem in GDIPlus?
Anthony
Re: Winapi DrawText on chart no longer use canvas settings
Posted: Thu Dec 28, 2017 9:48 am
by Marc
Hello Anthony,
We don't have this listed to modify for GDI+. There is the alternative approach using TeeChart's own TextOut.
eg.
Code: Select all
Chart.Canvas.Font.Color := clred;
Chart.Canvas.Font.Size := 15;
Chart.Canvas.TextOut(r.Left,r.Top,str);
You'd need to add some code to divide up your lines at the spaces.
Regards,
Marc Meumann
Re: Winapi DrawText on chart no longer use canvas settings
Posted: Wed May 20, 2020 1:03 pm
by 16588166
Hello anyone,
Back to this problem.
The use of DrawText being much more powerful than the use of TextOut, isn't the correction of this regression planned yet ?
Re: Winapi DrawText on chart no longer use canvas settings
Posted: Tue Jun 23, 2020 10:30 am
by Marc
Hello,
When using GDI+, TeeChart uses the GDI+ DrawString method internally.
Regards,
Marc Meumann