mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 14:59:11 +02:00
TAChart: Fix location of DataPointCrosshairTool cursor at perimeter of bubbles of TBubbleSeries.
git-svn-id: trunk@54316 -
This commit is contained in:
parent
3f057d8f9e
commit
b20170706a
@ -619,14 +619,14 @@ begin
|
|||||||
if (AResults.FYIndex = 0) then
|
if (AResults.FYIndex = 0) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if Result and (nptPoint in AParams.FTargets) and (nptPoint in ToolTargets) then
|
if Result and (nptYList in AParams.FTargets) and (nptYList in ToolTargets) then
|
||||||
if (AResults.FYIndex = 1) then begin
|
if (AResults.FYIndex = 1) then begin
|
||||||
item := Source[AResults.FIndex];
|
item := Source[AResults.FIndex];
|
||||||
GetBubbleRect(item, iRect);
|
GetBubbleRect(item, iRect);
|
||||||
rx := (iRect.Right - iRect.Left) div 2;
|
rx := (iRect.Right - iRect.Left) div 2;
|
||||||
ry := (iRect.Bottom - iRect.Top) div 2;
|
ry := (iRect.Bottom - iRect.Top) div 2;
|
||||||
p := ParentChart.GraphToImage(AxisToGraph(item^.Point));
|
p := ParentChart.GraphToImage(AxisToGraph(item^.Point));
|
||||||
phi := -arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
|
phi := arctan2(AParams.FPoint.Y - p.y, AParams.FPoint.X - p.x);
|
||||||
SinCos(phi, sinphi, cosphi);
|
SinCos(phi, sinphi, cosphi);
|
||||||
AResults.FImg := p + Point(round(rx * cosPhi), round(ry * sinPhi));
|
AResults.FImg := p + Point(round(rx * cosPhi), round(ry * sinPhi));
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user