Page 1 of 1

TeeTree Lines doubled the size

Posted: Tue Mar 25, 2014 1:41 pm
by 16568187
Hi,

When I use TeeChart 2014 and drop a TeeTree to a form, and double click to bring up the Tree Form. The grid dots and all the lines drawn are doubled the size compare to the TeeChart 2012 version. Is there an option to set these sizes?

I have TeeChart Pro v2012.07.121105 32bit VCL installed on BCB XE2 and TeeChart Pro v2014.10.140220 32bit VCL installed on BCB XE5, runing Windows 7.

Thanks

-Bill

Re: TeeTree Lines doubled the size

Posted: Tue Mar 25, 2014 2:11 pm
by yeray
Hi Bill,

This because we moved from GDi to GDI+ as the default Canvas.
You have several options to move back to GDI:

- To change only the actual TTree at design time, open the dfm "as text" (Open the design time view of the form, right click on the form and choose "View as Text") and change the property under your TTree object from this:

Code: Select all

DefaultCanvas = 'TGDIPlusCanvas'
To this:

Code: Select all

DefaultCanvas = ''
- To change only the actual TTree at runtime, use this code:

Code: Select all

uses TeCanvas;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Tree1.Canvas:=TTeeCanvas3D.Create;
end;
- To change the Canvas for all the new TCharts and TTees you will create, drop a chart on a form, right click on it, select "Options" option and in the "New Chart" tab Change GDI+ for GDI in the "Render" combobox.

Re: TeeTree Lines doubled the size

Posted: Wed Mar 26, 2014 12:12 pm
by 16568187
Thanks for the reply. Is there a way to plot with the original line width (thin) using GDI+

Thanks

Re: TeeTree Lines doubled the size

Posted: Thu Mar 27, 2014 9:05 am
by yeray
Hi Bill,

You can set AntiAlias=False if you want.
Then, if an element has OnBeforeDraw and OnAfterDraw events, you can use them to activate the AntiAlias before drawing that element and deactivate it after drawing it, so the antialias can be applied only to that element.

Here it is an example with Chart Series and SeriesBeforeDrawValues & SeriesAfterDrawValues events:
http://www.teechart.net/support/viewtop ... 237#p64237