Page 1 of 1

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

Posted: Tue May 26, 2009 1:08 pm
by 10046032
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

Posted: Tue May 26, 2009 2:22 pm
by yeray
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;

Posted: Wed May 27, 2009 4:58 am
by 10046032
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

Posted: Wed May 27, 2009 7:21 am
by 10046032
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

Posted: Wed May 27, 2009 8:38 am
by narcis
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.

Posted: Thu May 28, 2009 9:13 am
by 10549714
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

Posted: Thu May 28, 2009 9:19 am
by narcis
Hi Marius,

It's probable that a release fixing a few issues can be published quite soon.

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

Posted: Mon Jun 15, 2009 9:13 am
by 10549714
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.

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

Posted: Mon Jun 15, 2009 9:51 am
by narcis
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.

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

Posted: Mon Jun 15, 2009 9:59 am
by narcis
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!

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

Posted: Mon Jun 15, 2009 10:07 am
by 10549714
Excellent - Thanks Narcis

Re:

Posted: Mon Jun 15, 2009 8:08 pm
by 10549646
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 :-)

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

Posted: Tue Jun 16, 2009 7:17 am
by narcis
Hi kroimon,

Yes, that's it.