Qt: TQtWidgetset.Ellipse() offset by -1. issue #35568

git-svn-id: trunk@61220 -
This commit is contained in:
zeljko 2019-05-13 13:03:24 +00:00
parent 5981e87a6b
commit 73d58ce791

View File

@ -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;