diff options
| author | Gerd Moellmann | 2001-09-27 09:14:30 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-09-27 09:14:30 +0000 |
| commit | de507556f31dc3433082a98e856fc0ca4d7e250f (patch) | |
| tree | e9042520ffff9ca2579c496c6ca7a68d0ee36c79 /src | |
| parent | 9240e746c09c38a7938e2277d35c2f8a98e33687 (diff) | |
| download | emacs-de507556f31dc3433082a98e856fc0ca4d7e250f.tar.gz emacs-de507556f31dc3433082a98e856fc0ca4d7e250f.zip | |
(x_draw_relief_rect): Draw bottom relief 1 pixel more
to the left. Some cleanup.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/xterm.c b/src/xterm.c index 2c3471509d7..33f72d987af 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3888,6 +3888,8 @@ x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, | |||
| 3888 | int left_x, top_y, right_x, bottom_y, left_p, right_p, raised_p; | 3888 | int left_x, top_y, right_x, bottom_y, left_p, right_p, raised_p; |
| 3889 | XRectangle *clip_rect; | 3889 | XRectangle *clip_rect; |
| 3890 | { | 3890 | { |
| 3891 | Display *dpy = FRAME_X_DISPLAY (f); | ||
| 3892 | Window window = FRAME_X_WINDOW (f); | ||
| 3891 | int i; | 3893 | int i; |
| 3892 | GC gc; | 3894 | GC gc; |
| 3893 | 3895 | ||
| @@ -3895,40 +3897,40 @@ x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, | |||
| 3895 | gc = f->output_data.x->white_relief.gc; | 3897 | gc = f->output_data.x->white_relief.gc; |
| 3896 | else | 3898 | else |
| 3897 | gc = f->output_data.x->black_relief.gc; | 3899 | gc = f->output_data.x->black_relief.gc; |
| 3898 | XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, clip_rect, 1, Unsorted); | 3900 | XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted); |
| 3899 | 3901 | ||
| 3900 | /* Top. */ | 3902 | /* Top. */ |
| 3901 | for (i = 0; i < width; ++i) | 3903 | for (i = 0; i < width; ++i) |
| 3902 | XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3904 | XDrawLine (dpy, window, gc, |
| 3903 | left_x + i * left_p, top_y + i, | 3905 | left_x + i * left_p, top_y + i, |
| 3904 | right_x + 1 - i * right_p, top_y + i); | 3906 | right_x + 1 - i * right_p, top_y + i); |
| 3905 | 3907 | ||
| 3906 | /* Left. */ | 3908 | /* Left. */ |
| 3907 | if (left_p) | 3909 | if (left_p) |
| 3908 | for (i = 0; i < width; ++i) | 3910 | for (i = 0; i < width; ++i) |
| 3909 | XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3911 | XDrawLine (dpy, window, gc, |
| 3910 | left_x + i, top_y + i, left_x + i, bottom_y - i + 1); | 3912 | left_x + i, top_y + i, left_x + i, bottom_y - i + 1); |
| 3911 | 3913 | ||
| 3912 | XSetClipMask (FRAME_X_DISPLAY (f), gc, None); | 3914 | XSetClipMask (dpy, gc, None); |
| 3913 | if (raised_p) | 3915 | if (raised_p) |
| 3914 | gc = f->output_data.x->black_relief.gc; | 3916 | gc = f->output_data.x->black_relief.gc; |
| 3915 | else | 3917 | else |
| 3916 | gc = f->output_data.x->white_relief.gc; | 3918 | gc = f->output_data.x->white_relief.gc; |
| 3917 | XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, clip_rect, 1, Unsorted); | 3919 | XSetClipRectangles (dpy, gc, 0, 0, clip_rect, 1, Unsorted); |
| 3918 | 3920 | ||
| 3919 | /* Bottom. */ | 3921 | /* Bottom. */ |
| 3920 | for (i = 0; i < width; ++i) | 3922 | for (i = 0; i < width; ++i) |
| 3921 | XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3923 | XDrawLine (dpy, window, gc, |
| 3922 | left_x + i * left_p + 1, bottom_y - i, | 3924 | left_x + i * left_p, bottom_y - i, |
| 3923 | right_x + 1 - i * right_p, bottom_y - i); | 3925 | right_x + 2 - i * right_p, bottom_y - i); |
| 3924 | 3926 | ||
| 3925 | /* Right. */ | 3927 | /* Right. */ |
| 3926 | if (right_p) | 3928 | if (right_p) |
| 3927 | for (i = 0; i < width; ++i) | 3929 | for (i = 0; i < width; ++i) |
| 3928 | XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 3930 | XDrawLine (dpy, window, gc, |
| 3929 | right_x - i, top_y + i + 1, right_x - i, bottom_y - i); | 3931 | right_x - i, top_y + i + 1, right_x - i, bottom_y - i); |
| 3930 | 3932 | ||
| 3931 | XSetClipMask (FRAME_X_DISPLAY (f), gc, None); | 3933 | XSetClipMask (dpy, gc, None); |
| 3932 | } | 3934 | } |
| 3933 | 3935 | ||
| 3934 | 3936 | ||