Mercurial > emacs
comparison src/xterm.c @ 39474:5f9f7d59fd79
(x_draw_relief_rect): Draw bottom relief 1 pixel more
to the left. Some cleanup.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 27 Sep 2001 09:14:30 +0000 |
parents | a6b7de61a863 |
children | 2ca67ed01cd8 |
comparison
equal
deleted
inserted
replaced
39473:d625186dd9d1 | 39474:5f9f7d59fd79 |
---|---|
3886 raised_p, left_p, right_p, clip_rect) | 3886 raised_p, left_p, right_p, clip_rect) |
3887 struct frame *f; | 3887 struct frame *f; |
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 |
3894 if (raised_p) | 3896 if (raised_p) |
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 |
3935 /* Draw a box on frame F inside the rectangle given by LEFT_X, TOP_Y, | 3937 /* Draw a box on frame F inside the rectangle given by LEFT_X, TOP_Y, |
3936 RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the lines to | 3938 RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the lines to |