From ecc0622c21866b811f870e188162a0fcc856f9c8 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 30 Apr 2010 15:24:16 +0200 Subject: X11: Fixed bug where 1x1 rectangle is not drawn. --- src/corelib/x11/fpg_x11.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index 17cf56d4..24c5d3c3 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -2125,7 +2125,10 @@ procedure TfpgX11Canvas.DoDrawRectangle(x, y, w, h: TfpgCoord); begin // writeln(Format('DoDrawRectangle x=%d y=%d w=%d h=%d', [x, y, w, h])); // Same behavior as Windows. See documentation for reason. - XDrawRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1); + if (w = 1) and (h = 1) then // a dot + DoDrawLine(x, y, x+w, y+w) + else + XDrawRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1); end; procedure TfpgX11Canvas.DoDrawLine(x1, y1, x2, y2: TfpgCoord); -- cgit v1.2.3-70-g09d2