Change In Font Height Changes Font Color for TDChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
WJEC
Newbie
Newbie
Posts: 3
Joined: Tue Jul 23, 2013 12:00 am

Change In Font Height Changes Font Color for TDChart

Post by WJEC » Thu Oct 10, 2013 5:04 pm

I am using Delphi XE2 (RAD Studio) with Update 4 HotFix 1. I have just upgraded to the latest TeeChart 9.0.8.0, with source, and had to do a recompile to install into XE2.

Prior to the upgrade everything was working fine. After the upgrade I saw odd behavior in my code being executed in the OnAfterDraw event handler for TDCharts. Specifically in the following code nothing would be displayed for the second TextOut. Remove the change in font height line and both lines display.

Chart.Canvas.TextOut(130, 100, 'Before Font Height Change');
Chart.Canvas.Font.Height := 15;
Chart.Canvas.TextOut(130, 110, 'After Font Height Change'); // NOT DISPLAYED WHEN ABOVE FONT HEIGHT LINE PRESENT

Further more inserting the following line after the Font Height change had no effect.
Chart.Canvas.Font.Color := clBlack;

I have attached a simple project displaying the issue.

Your help/insight would be appreciated.
Attachments
TChartTEst.zip
Zip file with simple project
(256.46 KiB) Downloaded 409 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Change In Font Height Changes Font Color for TDChart

Post by Yeray » Fri Oct 11, 2013 11:27 am

Hi,

It seems it has always been like this in GDI+. The issue here is that the v2013.08 is the first version to use GDI+ by default. If you want to switch back to GDI you can:

- Set the GDI Canvas for the current application:
· At design time, you can open the editor and select GDI at the Chart/3D/Render tab.
· At runtime, you can add the TeCanvas unit and do this:

Code: Select all

Chart1.Canvas:=TTeeCanvas3D.Create;
- Set the GDI Canvas as the default Render option for the new charts you may create:
At design time, open the Options... dialog in the contextual menu (right click on the chart). Go to the New Chart tab and select GDI as the Render option.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

WJEC
Newbie
Newbie
Posts: 3
Joined: Tue Jul 23, 2013 12:00 am

Re: Change In Font Height Changes Font Color for TDChart

Post by WJEC » Fri Oct 11, 2013 9:54 pm

That fixed the problem.
Your help is much appreciated.

Post Reply