mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-22 03:05:58 +02:00
Qt: Fixed LineTo() extra point drawing.
git-svn-id: trunk@12397 -
This commit is contained in:
parent
e07b98989f
commit
3de9cce666
@ -3462,6 +3462,8 @@ end;
|
|||||||
function TQtWidgetSet.LineTo(DC: HDC; X, Y: Integer): Boolean;
|
function TQtWidgetSet.LineTo(DC: HDC; X, Y: Integer): Boolean;
|
||||||
var
|
var
|
||||||
PenPos: TPoint;
|
PenPos: TPoint;
|
||||||
|
CX: Integer;
|
||||||
|
CY: Integer;
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseQtWinAPI}
|
{$ifdef VerboseQtWinAPI}
|
||||||
WriteLn('[WinAPI LineTo]');
|
WriteLn('[WinAPI LineTo]');
|
||||||
@ -3473,9 +3475,18 @@ begin
|
|||||||
|
|
||||||
TQtDeviceContext(DC).getPenPos(@PenPos);
|
TQtDeviceContext(DC).getPenPos(@PenPos);
|
||||||
|
|
||||||
TQtDeviceContext(DC).drawLine( PenPos.X, PenPos.Y, X, Y);
|
CX := X;
|
||||||
|
CY := Y;
|
||||||
MoveToEx(DC, X, Y, nil);
|
|
||||||
|
if (CX <> PenPos.X) and (CX > 0) and (CX > PenPos.X) then
|
||||||
|
CX := CX - 1;
|
||||||
|
|
||||||
|
if (CY <> PenPos.Y) and (CY > 0) and (CY > PenPos.Y) then
|
||||||
|
CY := CY - 1;
|
||||||
|
|
||||||
|
TQtDeviceContext(DC).drawLine( PenPos.X, PenPos.Y, CX, CY);
|
||||||
|
|
||||||
|
MoveToEx(DC, CX, CY, nil);
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user