diff options
| author | Jason Rumney | 2002-03-29 18:37:50 +0000 |
|---|---|---|
| committer | Jason Rumney | 2002-03-29 18:37:50 +0000 |
| commit | df3bd29ddec4f04f607eeefe599993bfbdec3714 (patch) | |
| tree | 054e0eeb7630d69a9e7c958e0d7aebe4b8cacb3f | |
| parent | b28b7aa9f310ac21df4e0c2dbfb11e482093d076 (diff) | |
| download | emacs-df3bd29ddec4f04f607eeefe599993bfbdec3714.tar.gz emacs-df3bd29ddec4f04f607eeefe599993bfbdec3714.zip | |
(w32_draw_relief_rect): Fix calculations of line lengths.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/w32term.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 93db941709e..d6a7ffa522f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2002-03-29 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32term.c (w32_draw_relief_rect): Fix calculations of line lengths. | ||
| 4 | |||
| 1 | 2002-03-29 Eli Zaretskii <eliz@is.elta.co.il> | 5 | 2002-03-29 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 6 | ||
| 3 | * Makefile.in (lread.o): Depend on coding.h. | 7 | * Makefile.in (lread.o): Depend on coding.h. |
diff --git a/src/w32term.c b/src/w32term.c index 3edfba83919..56565aee454 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3728,14 +3728,14 @@ w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, | |||
| 3728 | for (i = 0; i < width; ++i) | 3728 | for (i = 0; i < width; ++i) |
| 3729 | w32_fill_area (f, hdc, gc.foreground, | 3729 | w32_fill_area (f, hdc, gc.foreground, |
| 3730 | left_x + i * left_p, top_y + i, | 3730 | left_x + i * left_p, top_y + i, |
| 3731 | (right_x + 1 - i * right_p) - (left_x + i * left_p) + 1, 1); | 3731 | right_x - left_x - i * (left_p + right_p ) + 1, 1); |
| 3732 | 3732 | ||
| 3733 | /* Left. */ | 3733 | /* Left. */ |
| 3734 | if (left_p) | 3734 | if (left_p) |
| 3735 | for (i = 0; i < width; ++i) | 3735 | for (i = 0; i < width; ++i) |
| 3736 | w32_fill_area (f, hdc, gc.foreground, | 3736 | w32_fill_area (f, hdc, gc.foreground, |
| 3737 | left_x + i, top_y + i, 1, | 3737 | left_x + i, top_y + i, 1, |
| 3738 | (bottom_y - i) - (top_y + i) + 2); | 3738 | bottom_y - top_y - 2 * i + 1); |
| 3739 | 3739 | ||
| 3740 | if (raised_p) | 3740 | if (raised_p) |
| 3741 | gc.foreground = f->output_data.w32->black_relief.gc->foreground; | 3741 | 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, | |||
| 3746 | for (i = 0; i < width; ++i) | 3746 | for (i = 0; i < width; ++i) |
| 3747 | w32_fill_area (f, hdc, gc.foreground, | 3747 | w32_fill_area (f, hdc, gc.foreground, |
| 3748 | left_x + i * left_p, bottom_y - i, | 3748 | left_x + i * left_p, bottom_y - i, |
| 3749 | (right_x - i * right_p) - (left_x + i * left_p) + 2, 1); | 3749 | right_x - left_x - i * (left_p + right_p) + 1, 1); |
| 3750 | 3750 | ||
| 3751 | /* Right. */ | 3751 | /* Right. */ |
| 3752 | if (right_p) | 3752 | if (right_p) |
| 3753 | for (i = 0; i < width; ++i) | 3753 | for (i = 0; i < width; ++i) |
| 3754 | w32_fill_area (f, hdc, gc.foreground, | 3754 | w32_fill_area (f, hdc, gc.foreground, |
| 3755 | right_x - i, top_y + i + 1, 1, | 3755 | right_x - i, top_y + i + 1, 1, |
| 3756 | (bottom_y - i) - (top_y + i)); | 3756 | bottom_y - top_y - 2 * i - 1); |
| 3757 | 3757 | ||
| 3758 | w32_set_clip_rectangle (hdc, NULL); | 3758 | w32_set_clip_rectangle (hdc, NULL); |
| 3759 | 3759 | ||