Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-06

TLineSeries Bug

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

Dear Alexander,
I found a bug in TLineSeries that was introduced in: Revision: 25921
Author: ask
Date: 17.06.46, sabato 5 giugno 2010
Message:
TAChart: Pre-filter points outside of the current extent in TLineSeries.Draw ----
Modified : /trunk/components/tachart/tasources.pas Modified : /trunk/components/tachart/taseries.pas

The code responsible of the bug is this:

   // Find an interval of x-values intersecting the CurrentExtent.
   // Requires monotonic (but not necessarily increasing) axis
transformation.
   lb := 0;
   ub := Count - 1;
   if LineType  ltFromOrigin then begin
     Source.FindBounds(GraphToAxisX(ext.a.X), GraphToAxisX(ext.b.X), lb,
ub);
     lb := Max(lb - 1, 0);
     ub := Min(ub + 1, Count - 1);
   end;
   SetLength(gp, ub - lb + 1);

With this code not every point is drawn (see attached image where you can see the marks but not the corresponding points).

Andrea

Reply by email

Andrea Mauri
to Andrea Mauri

Il 11/06/2010 10.31, Andrea Mauri ha scritto:

With this code not every point is drawn (see attached image where you can see the marks but not the corresponding points).

It seems that the image was not attached..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scatter.jpg
Type: image/jpeg
Size: 24372 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100611/40507965/attachment-0001.jpg>

Reply by email

Alexander Klenin
to Andrea Mauri

2010/6/11 Andrea Mauri :

Show quoted text 6 lines
Il 11/06/2010 10.31, Andrea Mauri ha scritto: > > With this code not every point is drawn (see attached image where you > can see the marks but not the corresponding points). It seems that the image was not attached..

Hm, very interesting -- can you create a small application demonstrating the problem?
Meanwhile, this change is a pure optimization, so you can safely comment out the if block until the bug is fixed.

Alexander S. Klenin

Reply by email

Andrea Mauri
to Alexander Klenin

Il 11/06/2010 12.42, Alexander Klenin ha scritto:

Show quoted text 8 lines
On Fri, Jun 11, 2010 at 19:31, Andrea Mauri wrote: > Dear Alexander, > I found a bug in TLineSeries that was introduced in: > Revision: 25921 Also, please update to a recent version -- this revision is in the middle of serious change, so maybe it is already fixed.

I tried the last svn, the bug is not fixed. I will try to provide you a sample project in order to reproduce the bug.

Reply by email

Alexander Klenin
to Andrea Mauri
Andrea Mauri wrote 14 lines
Il 11/06/2010 12.42, Alexander Klenin ha scritto: > > On Fri, Jun 11, 2010 at 19:31, Andrea Mauri > ?wrote: >> >> Dear Alexander, >> I found a bug in TLineSeries that was introduced in: >> Revision: 25921 > > Also, please update to a recent version -- this revision is in the middle > of serious change, so maybe it is already fixed. > I tried the last svn, the bug is not fixed. I will try to provide you a sample project in order to reproduce the bug.

I have managed to reproduce it myself. Should be fixed in r26041.

Alexander S. Klenin

Reply by email