Painting non-rectanglar point with Anti-Aliasing tool

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Michael Heinrich
Newbie
Newbie
Posts: 20
Joined: Thu Feb 04, 2010 12:00 am

Painting non-rectanglar point with Anti-Aliasing tool

Post by Michael Heinrich » Fri Feb 19, 2010 10:16 am

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.
Attachments
Project23.zip
Form with AntiAlias Tool, LineSeries, PointSeries all have rectangle pointers
(9.27 KiB) Downloaded 707 times

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

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

Post by Yeray » Fri Feb 19, 2010 4:53 pm

Hi Michael,

I've been able to reproduce it so I've added it to the defect list to be fixed asap (TV52014692)
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

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

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

Post by Yeray » Thu Feb 25, 2010 3:17 pm

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

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

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

Post by Narcís » Thu Feb 25, 2010 3:29 pm

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