]> code.delx.au - gnu-emacs/commitdiff
(w32_draw_relief_rect): Fix calculations of line lengths.
authorJason Rumney <jasonr@gnu.org>
Fri, 29 Mar 2002 18:37:50 +0000 (18:37 +0000)
committerJason Rumney <jasonr@gnu.org>
Fri, 29 Mar 2002 18:37:50 +0000 (18:37 +0000)
src/ChangeLog
src/w32term.c

index 93db941709e99d22c187363ffaedccb869ec60e8..d6a7ffa522f1e344747d893f9e66c60a8cdddb16 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-29  Jason Rumney  <jasonr@gnu.org>
+
+       * w32term.c (w32_draw_relief_rect): Fix calculations of line lengths.
+
 2002-03-29  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * Makefile.in (lread.o): Depend on coding.h.
index 3edfba83919f63d970d808ce082b28b61335bdb4..56565aee454a0bde7d4637d314744c9f5568a978 100644 (file)
@@ -3728,14 +3728,14 @@ w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
   for (i = 0; i < width; ++i)
     w32_fill_area (f, hdc, gc.foreground,
                   left_x + i * left_p, top_y + i,
-                  (right_x + 1 - i * right_p) - (left_x + i * left_p) + 1, 1);
+                  right_x - left_x - i * (left_p + right_p ) + 1, 1);
 
   /* Left.  */
   if (left_p)
     for (i = 0; i < width; ++i)
       w32_fill_area (f, hdc, gc.foreground,
                     left_x + i, top_y + i, 1,
-                    (bottom_y - i) - (top_y + i) + 2);
+                    bottom_y - top_y - 2 * i + 1);
 
   if (raised_p)
     gc.foreground = f->output_data.w32->black_relief.gc->foreground;
@@ -3746,14 +3746,14 @@ w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width,
   for (i = 0; i < width; ++i)
     w32_fill_area (f, hdc, gc.foreground, 
                   left_x + i * left_p, bottom_y - i,
-                  (right_x - i * right_p) - (left_x + i * left_p) + 2, 1);
+                  right_x - left_x - i * (left_p + right_p) + 1, 1);
 
   /* Right.  */
   if (right_p)
     for (i = 0; i < width; ++i)
       w32_fill_area (f, hdc, gc.foreground,
                     right_x - i, top_y + i + 1, 1,
-                    (bottom_y - i) - (top_y + i));
+                    bottom_y - top_y - 2 * i - 1);
 
   w32_set_clip_rectangle (hdc, NULL);