TAChart: Fix axis transformations support in data point tools

git-svn-id: trunk@32500 -
This commit is contained in:
ask 2011-09-24 13:47:06 +00:00
parent 90c5d4a946
commit 9357e21926

View File

@ -923,7 +923,7 @@ begin
// Since axis transformation may be non-linear, the distance should be // Since axis transformation may be non-linear, the distance should be
// measured in screen coordinates. With high zoom ratios this may lead to // measured in screen coordinates. With high zoom ratios this may lead to
// an integer overflow, so ADistFunc should use saturation arithmetics. // an integer overflow, so ADistFunc should use saturation arithmetics.
pt := Point(GetXImgValue(i), GetYImgValue(i)); pt := ParentChart.GraphToImage(AxisToGraph(Source[i]^.Point));
dist := AParams.FDistFunc(AParams.FPoint, pt); dist := AParams.FDistFunc(AParams.FPoint, pt);
if (dist >= AResults.FDist) or (dist > Sqr(AParams.FRadius)) then continue; if (dist >= AResults.FDist) or (dist > Sqr(AParams.FRadius)) then continue;
AResults.FDist := dist; AResults.FDist := dist;