summaryrefslogtreecommitdiff
path: root/java/org/gnu/emacs/EmacsDrawRectangle.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/org/gnu/emacs/EmacsDrawRectangle.java')
-rw-r--r--java/org/gnu/emacs/EmacsDrawRectangle.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/org/gnu/emacs/EmacsDrawRectangle.java b/java/org/gnu/emacs/EmacsDrawRectangle.java
index 462bf7c85b5..e3f28227146 100644
--- a/java/org/gnu/emacs/EmacsDrawRectangle.java
+++ b/java/org/gnu/emacs/EmacsDrawRectangle.java
@@ -57,7 +57,10 @@ public class EmacsDrawRectangle implements EmacsPaintReq
public Rect
getRect ()
{
- return new Rect (x, y, x + width, y + height);
+ /* Canvas.drawRect actually behaves exactly like PolyRectangle wrt
+ to where the lines are placed, so extend the width and height
+ by 1 in the damage rectangle. */
+ return new Rect (x, y, x + width + 1, y + height + 1);
}
@Override
@@ -89,9 +92,10 @@ public class EmacsDrawRectangle implements EmacsPaintReq
return;
alu = immutableGC.function;
- rect = getRect ();
+ rect = new Rect (x, y, x + width, y + height);
paint.setStyle (Paint.Style.STROKE);
+ paint.setStrokeWidth (1);
if (alu == EmacsGC.GC_COPY)
paint.setXfermode (null);