TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Thu Jun 19, 2014 11:44 am
Hi
I am reworking an old application that has 5 charts in a gridpanel component. I hook each of the charts to a GDI+ component and set active true and anti-aliasing off. When working on the design in the IDE I noticed that anti-aliasing was now on in the charts, even when it wasn't set.
I then set each of the GDI+ components to active but it made no difference, so I deleted all the GDI+ components but the anti-aliasing is still active without any GDI+ component both in the IDE and at run-time

.
I haven't had time to look at the new bug tracker yet, but I wonder if this problem has been logged?
Bruce.
-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Thu Jun 19, 2014 12:47 pm
Hi Yeray
Thanks for the advice.
GDI is a bit confusing and there's very little help or guidance in the documentation either.
Do I understand it that GDI is always enabled?
Bruce.
-
Yeray
- Site Admin

- Posts: 9644
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Jun 19, 2014 1:31 pm
Hi Bruce,
Metman wrote:GDI is a bit confusing and there's very little help or guidance in the documentation either.
Do I understand it that GDI is always enabled?
TeeChart VCL supports three Canvas: GDI, GDIPlus and OpenGL
TeeChart 2013.09 moved the default Canvas from GDI to GDIPlus (see the
What's New page). This is for new charts being created while the charts already present in old forms should keep their choice.
However, you can still:
- Change the current chart's canvas:
- Through the editor at the "Chart/3D/Render" tab:

- 2014-06-19_1542.png (8.26 KiB) Viewed 23667 times
- By code
To set GDI by code:
Code: Select all
uses TeCanvas;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Canvas:=TTeeCanvas3D.Create;
end;
To set GDIPlus by code:
Code: Select all
uses TeeGDIPlus;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Canvas:=TGDIPlusCanvas.Create;
end;
- Change the option for the next new charts to be created at the "New Chart" tab in the "Options..." dialog opened from the contextual menu at design time::

-
Metman
- Advanced
- Posts: 113
- Joined: Fri Dec 21, 2007 12:00 am
Post
by Metman » Thu Jun 19, 2014 2:06 pm
Hi Yeray
Thanks that's a lot clearer.
I think it would be preferable to set GDI in code and stop cluttering the design view with TTeeGDIPlus components like you suggest, but just how do I set Antialias=false and AntiAliasText=gpfClearType in code?
Bruce.
-
Yeray
- Site Admin

- Posts: 9644
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Jun 19, 2014 3:00 pm
Hello Bruce,
Find attached a project that shows you how to change both the Canvas and the font AntiAlias by code:
Also,
here you'll find an example showing the alternatives supported for the AntiAlias in the canvas.
-
cssesuc
- Newbie

- Posts: 44
- Joined: Wed Apr 08, 2015 12:00 am
Post
by cssesuc » Wed Sep 09, 2015 3:53 pm
thanks it helped a lot.
thanks,
Nabil Ghodbane (PhD. Habil)
-
nbp
- Newbie

- Posts: 15
- Joined: Fri Apr 01, 2016 12:00 am
Post
by nbp » Wed Dec 07, 2016 10:46 pm
What is the snippet of code to use the GDI renderer for C++ ActiveX component? (instead of GDIPlus).
i.e. I want to set Chart canvas to GDI instead of the default which is GDIPlus in TChart2016 ActiveX
Regards
--nbp
-
Sandra
- Site Admin

- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Fri Dec 09, 2016 3:14 pm
Hello nbp,
I have answered you in that
thread.
Thanks in advance