mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 00:00:49 +01:00
LCL: Improve TArrow drawing when angle=90. Issue #28235, patch from Alexey Torgashin.
git-svn-id: trunk@49252 -
This commit is contained in:
parent
4e7cdba43b
commit
4d9dbbe158
16
lcl/arrow.pp
16
lcl/arrow.pp
@ -132,6 +132,22 @@ begin
|
||||
FR.Left:= midX - size.cx div 2;
|
||||
FR.Right:= FR.Left + size.cx;
|
||||
|
||||
// angle=90: 1pixel shift appears (reason: float math)
|
||||
// workaround:
|
||||
if FArrowAngle=90 then
|
||||
begin
|
||||
if FArrowType in [atUp, atDown] then
|
||||
begin
|
||||
FR.Left:= midX-size.cy;
|
||||
FR.Right:= midX+size.cy;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FR.Top:= midY-size.cx;
|
||||
FR.Bottom:= midY+size.cx;
|
||||
end;
|
||||
end;
|
||||
|
||||
case FArrowType of
|
||||
atUp: begin
|
||||
FT[ptC] := Point(midX, FR.Top);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user