Hi all,

I'm trying to use the TAChart under 0.9.28.1 (I downloaded 
"Lazarus-0.9.28.1-21932-fpc-2.2.4-20091001-win32.exe").

I have a problem the OnDrawReticule event. It's never called :(
I take a look at the source and I find that in the "UpdateReticule" procedure 
(line 914 of TAGraph) the function "GetNearestPoint" is called but it always 
return False. 

UpdateReticule contain:
--------------------------------------------------
    for i := 0 to SeriesCount - 1 do begin
      if
        Series[i].GetNearestPoint(
          DIST_FUNCS[FReticuleMode], APoint, pointIndex, newRetPos, value) and
        (newRetPos <> FReticulePos) and PtInRect(FClipRect, newRetPos)
      then begin
        DoDrawReticule(i, pointIndex, newRetPos, value);
        DrawReticule(Canvas);
        FReticulePos := newRetPos;
        DrawReticule(Canvas);
        exit;
      end;
    end;           
--------------------------------------------------
As you can see DoDrawReticule is called only the result of the IF is true. 


The problem is that function "GetNearestPoint" contain:

--------------------------------------------------
function TBasicChartSeries.GetNearestPoint(
  ADistFunc: TPointDistFunc; const APoint: TPoint;
  out AIndex: Integer; out AImg: TPoint; out AValue: TDoublePoint): Boolean;
begin
  Unused(ADistFunc, APoint);
  AIndex := 0;
  AImg := Point(0, 0);
  AValue.X := 0;
  AValue.Y := 0;
  Result := false;
end;         
--------------------------------------------------

and the procedure "Unused" contain:

--------------------------------------------------
procedure Unused(const A1, A2);
begin
end; 
--------------------------------------------------

And the Result of the function is always false.

So the OnDrawReticule event is never called! Normal? 
This feature was working in 0.9.26. 

Regards,
--
Pierre Delore

http://datalinkwristapps.free.fr
http://dpsite.free.fr

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to