From fedf5595b3777cd05bf3ff812eae26973ffddaa4 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Sat, 3 Jan 2009 01:08:17 -0800 Subject: Fixed a bug where a thin horizontal line next to the image was not filled black. --- BUGS | 3 --- src/xlib.c | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BUGS b/BUGS index 2721538..44d1956 100644 --- a/BUGS +++ b/BUGS @@ -1,7 +1,4 @@ -A thin line of artifacts may be visible on the right of an image after -resizing. This will be fixed in the next release. - meh does not currently support display depths under 24 bits. This should be fixed in the next release. diff --git a/src/xlib.c b/src/xlib.c index 3025f16..7dfa69b 100644 --- a/src/xlib.c +++ b/src/xlib.c @@ -100,13 +100,15 @@ void drawimage(XImage *ximg, unsigned int width, unsigned int height){ if(xoffset){ rects[0].width = rects[1].width = xoffset; rects[0].height = rects[1].height = height; - rects[1].x = width - xoffset; + rects[1].x = xoffset + ximg->width; rects[1].y = 0; + rects[1].width = width - rects[1].x; }else if(yoffset){ rects[0].width = rects[1].width = width; - rects[0].height = rects[1].height = yoffset; + rects[0].height = yoffset; rects[1].x = 0; - rects[1].y = height - yoffset; + rects[1].y = yoffset + ximg->height; + rects[1].height = height - rects[1].y; } XFillRectangles(display, window, gc, rects, 2); } -- cgit v1.2.3