Is it a bug? (TeeChart 8.05 and Anti-alias)

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

Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by johnnix » Tue May 26, 2009 1:08 pm

Hello,

Just installed the latest 8.05 (full source) version and noticed something that looks like a bug. Here is how to reproduce it:

1. Drop a TChart onto a form
2. Add a TLineSeries
3. Add an Anti-Alias filter

Run the app and:

4. Fill with some random values
3. Zoom into some area and try pan move with the right mouse button.

You will notice that lines disappear!!!

Can you please confirm this and propose a fix?

Regards

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

Post by Yeray » Tue May 26, 2009 2:22 pm

Hi johnnix,

Yes, it seems that Line series with Antialias tool in 2D don't draw line sections of the points out of the chart. I've added it to the wish list to be fixed asap (TV52014184).

As workaround you could use a custom Antialias as in the demo at All Features/Welcome !/3D Canvas/AntiAlias:

Code: Select all

var InsideAntiAliasing: Boolean;

procedure TForm1.Chart1AfterDraw(Sender: TObject);
var b: TBitmap;
begin
  if (not InsideAntiAliasing) then
  begin
    InsideAntiAliasing:=True;  // set flag to avoid re-entrancy
    try
      b:=TeeAntiAlias(Chart1);  // create anti-aliased bitmap
      try
        Chart1.Canvas.Draw(0,0,b);  // draw bitmap onto Chart1
      finally
        b.Free;  // delete temporary bitmap
      end;
    finally
      InsideAntiAliasing:=False;  // reset flag
    end;
  end;
end;
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
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Post by johnnix » Wed May 27, 2009 4:58 am

Hello,

Thank you very much for your reply. Unfortunatelly I cannot use the code you send me, instead I would like to fix this directly into the sources. Can you please give me a hint where to look?

Regards

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Post by johnnix » Wed May 27, 2009 7:21 am

Hello,

Ok, I did a quick check between current TeeAntiAlias.pas and the one included in version 8.04 and found some differences in function LineTo (I stopped my search there as the fix seems to work ok). My edit was to comment out the conditions xs>=0 and ys>=0 at lines 998 and 1040 respectively. Can you please confirm that this edit is ok?

Code: Select all

while (xs<x) and (xs<Bitmap.Width) do//and (xs>=0) do
while (ys<y) and (ys<Bitmap.Height) do//and (ys>=0) do
Regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 27, 2009 8:38 am

Hi johnnix,

Thanks for your feedback. I've checked it was fix for TV52013611 that broke that. Doing the changes you suggest fixes both issues. I've made the change to the sources for next releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

Post by Marius » Thu May 28, 2009 9:13 am

Narcís

Will we have to wait long for this release (eg 6 months) or are you planning a "hotfix" in the near future?

Marius

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu May 28, 2009 9:19 am

Hi Marius,

It's probable that a release fixing a few issues can be published quite soon.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

Re: Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by Marius » Mon Jun 15, 2009 9:13 am

Narcis

Any details on whether this will be fixed now or do we have to wait for next major version?

Marius
Narcís wrote:It's probable that a release fixing a few issues can be published quite soon.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by Narcís » Mon Jun 15, 2009 9:51 am

Hi Marius,

TV52014184 has already been fixed. I think this will make in a new v8 maintenance release. There's no date fixed for that yet. We need to iron out some issues before publishing it.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by Narcís » Mon Jun 15, 2009 9:59 am

Hi Marius,

Checked you are a sourcecode customer and sent you TeeAntiAlias.pas with the fix to the issue. You can just backup/replace v8.05's version with this one and use TeeRecompile tool for compiling and installing the packages to your IDEs.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

Re: Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by Marius » Mon Jun 15, 2009 10:07 am

Excellent - Thanks Narcis

kroimon
Newbie
Newbie
Posts: 7
Joined: Thu Jul 17, 2008 12:00 am

Re:

Post by kroimon » Mon Jun 15, 2009 8:08 pm

johnnix wrote:

Code: Select all

while (xs<x) and (xs<Bitmap.Width) do//and (xs>=0) do
while (ys<y) and (ys<Bitmap.Height) do//and (ys>=0) do
I'm working with anti-aliased charts and need this bug fixed. I'm a source-code customer so I could recompile the unit.
Are these the only lines required to change?

Regards

PS: Would be great to see a maintenance release for that anti-alias bug in near future :-)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Is it a bug? (TeeChart 8.05 and Anti-alias)

Post by Narcís » Tue Jun 16, 2009 7:17 am

Hi kroimon,

Yes, that's it.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply