From 73d58ce791702467f0664a0a339507971595f761 Mon Sep 17 00:00:00 2001 From: zeljko Date: Mon, 13 May 2019 13:03:24 +0000 Subject: [PATCH] Qt: TQtWidgetset.Ellipse() offset by -1. issue #35568 git-svn-id: trunk@61220 - --- lcl/interfaces/qt/qtwinapi.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/qt/qtwinapi.inc b/lcl/interfaces/qt/qtwinapi.inc index 2ff7230704..af83e6da93 100644 --- a/lcl/interfaces/qt/qtwinapi.inc +++ b/lcl/interfaces/qt/qtwinapi.inc @@ -1510,10 +1510,11 @@ var R: TRect; begin if not IsValidDC(DC) then Exit(False); - R := NormalizeRect(Rect(X1, Y1, X2, Y2)); + {ellipse under Qt4 needs an offset - issue #35568} + R := NormalizeRect(Rect(X1, Y1, X2 - 1, Y2 - 1)); if IsRectEmpty(R) then Exit(True); - TQtDeviceContext(DC).drawEllipse(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top{ - 1}); + TQtDeviceContext(DC).drawEllipse(R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top); Result := True; end;