Page 1 of 1

Painting non-rectanglar point with Anti-Aliasing tool

Posted: Fri Feb 19, 2010 10:16 am
by 10555193
Version: Build 8.06.60902

Hereby I send a project that contains a chart with three series. The chart has an Anti-Aliasing tool attached and is active.
When you change the pointer type to anything other than rectangular shape (any non-horizontal line/non-vertical line in the pointer, example Circle or triangle) the IDE crashes.

Steps to reproduce:

Open the form in IDE
Right click on chart and select the option for series.
Select any series and alter the pointer style into a circle.
The IDE crashes.

Code: Select all

procedure TAntiAliasCanvas.LineTo(X, Y: Integer);

.....
        
      if ISolid then
        begin
          while (xs<x) and (xs<[b]Bitmap[/b].Width) do
          begin
            yt:=yt+k;
            tmpYt:=Floor(yt);
I have traced the error and discovered that the application crashes on procedure TAntiAliasCanvas.LineTo(X, Y: Integer); line 988. When trying to determine the width of the bitmap it turns out that the bitmap is nil.
This crashes my entire IDE and I have to restart the IDE. Also at runtime this error occurs when you show the dialog to change the chart properies via the TeeCommander.

Re: Painting non-rectanglar point with Anti-Aliasing tool

Posted: Fri Feb 19, 2010 4:53 pm
by yeray
Hi Michael,

I've been able to reproduce it so I've added it to the defect list to be fixed asap (TV52014692)

Re: Painting non-rectanglar point with Anti-Aliasing tool

Posted: Thu Feb 25, 2010 3:17 pm
by yeray
Hi Michael,

I'd like you to know that the bug (TV52014692) has been fixed so it should work fine in the next maintenance v8 release.

Re: Painting non-rectanglar point with Anti-Aliasing tool

Posted: Thu Feb 25, 2010 3:29 pm
by narcis
Hi Michael,

In the meantime you can solve that checking if Bitmap is not nil, for example:

Code: Select all

        if ISolid then
        begin
          if Assigned(Bitmap) then
            while (xs<x) and (xs<Bitmap.Width) do
            begin
              yt:=yt+k;
              tmpYt:=Floor(yt);

              if tmpYt < 0 then tmpYt:=0;
              if tmpYt > Bitmap.Height then tmpYt:=Bitmap.Height-2;

              dist:=yt-tmpYt;
              oneDist:=1-dist;

              BlendColor1(xs, tmpYt);
              BlendColor2(xs, tmpYt+1);

              Inc(xs);
            end;
        end