1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-03 04:14:20 +01:00

fixed image clearing

This commit is contained in:
kojima
2000-03-07 01:12:12 +00:00
parent 0f9aa277c1
commit b974bd7e78
4 changed files with 52 additions and 9 deletions

View File

@@ -49,6 +49,23 @@ int main(int argc, char **argv)
img = RScaleImage(img, img->width*atof(argv[2]),
img->height*atof(argv[2]));
}
{
RImage *tmp = RCreateImage(200, 200, True);
RColor col = {0,0,255,255};
if (img->format == RRGBAFormat)
puts("aklpha");
else
puts("no alpha");
RClearImage(tmp, &col);
RCombineArea(tmp, img, 0, 0, 20, 20, 10, 10);
img = tmp;
}
if (!RConvertImage(ctx, img, &pix)) {
puts(RMessageForError(RErrorCode));
exit(1);
@@ -59,8 +76,7 @@ int main(int argc, char **argv)
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
img->width,
img->height, 0, 0, 0);
400, 400, 0, 0, 0);
XSetWindowBackgroundPixmap(dpy, win, pix);
XClearWindow(dpy, win);
XMapRaised(dpy, win);