AntiAlias issue

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

AntiAlias issue

Post by johnnix » Fri Mar 30, 2012 6:10 am

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

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

Re: AntiAlias issue

Post by Yeray » Fri Mar 30, 2012 2:56 pm

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.
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

johnnix
Newbie
Newbie
Posts: 3
Joined: Tue Sep 20, 2011 12:00 am

Re: AntiAlias issue

Post by johnnix » Fri Mar 30, 2012 3:16 pm

Hello,

Please find a sample app that is not working with my version of TChart.

Regards
Attachments
test.zip
(2.7 KiB) Downloaded 151 times

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

Re: AntiAlias issue

Post by Yeray » Tue Apr 03, 2012 8:47 am

Hi Johnnix,

That's what I get with it. I'm not sure to see any "missing segment":
AntiAlias.png
AntiAlias.png (29.41 KiB) Viewed 3969 times
NonAntiAlias.png
NonAntiAlias.png (18.1 KiB) Viewed 3958 times
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

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: AntiAlias issue

Post by Marco » Thu Feb 07, 2013 3:17 pm

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 :
Image

And without this tool :
Image

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

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

Re: AntiAlias issue

Post by Yeray » Fri Feb 08, 2013 9:17 am

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;
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

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: AntiAlias issue

Post by Marco » Fri Feb 08, 2013 3:10 pm

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

Code: Select all

#pragma link "TeeGDIPlus"
but TGDIPlusCanvas is unknown.

Thanks

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

Re: AntiAlias issue

Post by Yeray » Mon Feb 11, 2013 10:58 am

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.
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

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: AntiAlias issue

Post by Marco » Tue Feb 12, 2013 9:09 am

Hi Yeray,
I would like to use this code with Borland C++ Builder XE, with teechart v2011.04.
Thanks in advance

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

Re: AntiAlias issue

Post by Yeray » Tue Feb 12, 2013 11:23 am

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"
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

Marco
Newbie
Newbie
Posts: 18
Joined: Thu Sep 27, 2007 12:00 am
Location: 73 Savoie, FRANCE

Re: AntiAlias issue

Post by Marco » Tue Feb 12, 2013 2:37 pm

It works for me. Thank you !

The final rendering is different that with antialias tool but not so bad.

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

Re: AntiAlias issue

Post by Yeray » Wed Feb 13, 2013 8:27 am

Hi Chacal,

If you prefer the TAntialiasTool, the only way I see for you is to update to the current version.
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

Post Reply