Page 1 of 1
AntiAlias issue
Posted: Fri Mar 30, 2012 6:10 am
by 10046032
Hello,
I am using TeeChart 2011.03.30407 and I wish someone to inform me if the following bug is fixed in the latest release.
1. Add a TChart into a form
2. Double click and from the editor add a TLineSeries
3. Go to Tools->Other and add the Anti-Alias tool
4. The line should now miss several segments
Thank you all for your time
Regards
Re: AntiAlias issue
Posted: Fri Mar 30, 2012 2:56 pm
by yeray
Hi Johnnix,
Was this identified in the past? If so, do you know the ticket we assigned to it or the forum thread where we discussed it? I'm not able to find it.
In case it wasn't discussed in the past, I should be missing some relevant step because I can't reproduce it either with v2011.03 nor with the actual v2012.05. So, could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Re: AntiAlias issue
Posted: Fri Mar 30, 2012 3:16 pm
by 16560224
Hello,
Please find a sample app that is not working with my version of TChart.
Regards
Re: AntiAlias issue
Posted: Tue Apr 03, 2012 8:47 am
by yeray
Hi Johnnix,
That's what I get with it. I'm not sure to see any "missing segment":
- AntiAlias.png (29.41 KiB) Viewed 18906 times
- NonAntiAlias.png (18.1 KiB) Viewed 18895 times
Re: AntiAlias issue
Posted: Thu Feb 07, 2013 3:17 pm
by 10546851
Hello Yeray,
I am using Teechart 2011.04.41118 for C++ builder and I come across the same issue described in this post.
With the AntiAlias tool on a graph, all non horizontal lines are invisible.
Example with antialias tool :
And without this tool :
Is it a way to correct this problem ? Do I follow the suggestion you gave in this thread
http://www.teechart.net/support/viewtop ... =antialias ?
Thanks in advance and best regards.
Marco
Re: AntiAlias issue
Posted: Fri Feb 08, 2013 9:17 am
by yeray
Hi Marco,
I've been able to reproduce the problem with the v2011.04 and the code below:
Code: Select all
uses Series, TeeAntiAlias, TeeGDIPlus;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.Tools.Add(TAntiAliasTool);
//Chart1.Canvas:=TGDIPlusCanvas.Create;
with Chart1.AddSeries(TLineSeries) do
begin
Pen.Width:=2;
Add(0);
Add(100);
Add(100);
Add(0);
end;
Chart1.Axes.Left.SetMinMax(0, 120);
Chart1.Axes.Bottom.SetMinMax(0.25, 2.5);
end;
However, I can't reproduce it any more with the actual version.
Also, if I use GDIPlus instead of the TAntiAliasTool as you pointed, it seems to work fine in v2011.04.
Code: Select all
//Chart1.Tools.Add(TAntiAliasTool);
Chart1.Canvas:=TGDIPlusCanvas.Create;
Re: AntiAlias issue
Posted: Fri Feb 08, 2013 3:10 pm
by 10546851
Hello Yeray,
Is this code also usable with C++ builder ? :
Code: Select all
Chart1.Canvas:=TGDIPlusCanvas.Create;
I can't use this "TGDIPlusCanvas" type.
I add
but TGDIPlusCanvas is unknown.
Thanks
Re: AntiAlias issue
Posted: Mon Feb 11, 2013 10:58 am
by yeray
Hi Marco,
Right, that's Delphi code. It shouldn't be difficult to translate Delphi code but if you have problems with it, please tell us what exact IDE are you using and we'll try to check it in a very same environment than yours.
Re: AntiAlias issue
Posted: Tue Feb 12, 2013 9:09 am
by 10546851
Hi Yeray,
I would like to use this code with Borland C++ Builder XE, with teechart v2011.04.
Thanks in advance
Re: AntiAlias issue
Posted: Tue Feb 12, 2013 11:23 am
by yeray
Hi Marco,
the following code works fine for me here in XE both with TeeChart v2011.04 and the actual v2012.07:
Code: Select all
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Chart1->View3D=false;
Chart1->Legend->Visible=false;
Chart1->Canvas=new TGDIPlusCanvas();
TLineSeries *line1 = new TLineSeries(this);
Chart1->AddSeries(line1);
line1->Pen->Width=2;
line1->Add(0);
line1->Add(100);
line1->Add(100);
line1->Add(0);
Chart1->Axes->Left->SetMinMax(0, 120);
Chart1->Axes->Bottom->SetMinMax(0.25, 2.5);
}
I just had to add the TeeGDIPlus header in the .h:
Code: Select all
#include "Chart.hpp"
#include "TeEngine.hpp"
#include "TeeProcs.hpp"
#include "Series.hpp"
#include "TeeGDIPlus.hpp"
Re: AntiAlias issue
Posted: Tue Feb 12, 2013 2:37 pm
by 10546851
It works for me. Thank you !
The final rendering is different that with antialias tool but not so bad.
Re: AntiAlias issue
Posted: Wed Feb 13, 2013 8:27 am
by yeray
Hi Chacal,
If you prefer the TAntialiasTool, the only way I see for you is to update to the current version.