diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-30 15:24:16 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-04-30 15:24:16 +0200 |
commit | ecc0622c21866b811f870e188162a0fcc856f9c8 (patch) | |
tree | 6ca3cd5c3d177ce90b61e573944c3e969c1802c5 | |
parent | 100aa19f20291d7f4090f126b1f86b07d2299b2b (diff) | |
download | fpGUI-ecc0622c21866b811f870e188162a0fcc856f9c8.tar.xz |
X11: Fixed bug where 1x1 rectangle is not drawn.
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 5 |
1 files changed, 4 insertions, 1 deletions
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); |