aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-08-17 11:42:21 +0000
committernyamatongwe <unknown>2001-08-17 11:42:21 +0000
commitb740542ae719e448e9d60fdaed18e7aa0e924588 (patch)
treec6563aee9cce4a48944925c482aa01a018647fb3
parent07a269a00c84cd96d6bbd2bd7d5ebc907951f925 (diff)
downloadscintilla-mirror-b740542ae719e448e9d60fdaed18e7aa0e924588.tar.gz
Fixed up drawing of ellipses and rectangles for use in markers.
-rw-r--r--gtk/PlatGTK.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index e6b5b4960..c09aefa04 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -335,12 +335,15 @@ void Surface::RectangleDraw(PRectangle rc, Colour fore, Colour back) {
if (gc && drawable) {
PenColour(back);
gdk_draw_rectangle(drawable, gc, 1,
- rc.left, rc.top,
- rc.right - rc.left, rc.bottom - rc.top);
+ rc.left + 1, rc.top + 1,
+ rc.right - rc.left - 2, rc.bottom - rc.top - 2);
+
PenColour(fore);
+ // The subtraction of 1 off the width and height here shouldn't be needed but
+ // otherwise a different rectangle is drawn than would be done if the fill parameter == 1
gdk_draw_rectangle(drawable, gc, 0,
rc.left, rc.top,
- rc.right - rc.left, rc.bottom - rc.top);
+ rc.right - rc.left - 1, rc.bottom - rc.top - 1);
}
}
@@ -400,13 +403,15 @@ void Surface::RoundedRectangle(PRectangle rc, Colour fore, Colour back) {
void Surface::Ellipse(PRectangle rc, Colour fore, Colour back) {
PenColour(back);
gdk_draw_arc(drawable, gc, 1,
- rc.left, rc.top,
- rc.right - rc.left, rc.bottom - rc.top,
+ rc.left + 1, rc.top + 1,
+ rc.right - rc.left - 2, rc.bottom - rc.top - 2,
0, 32767);
+
+ // The subtraction of 1 here is similar to the case for RectangleDraw
PenColour(fore);
gdk_draw_arc(drawable, gc, 0,
rc.left, rc.top,
- rc.right - rc.left, rc.bottom - rc.top,
+ rc.right - rc.left - 1, rc.bottom - rc.top - 1,
0, 32767);
}