… | |
… | |
434 | Display *dpy = s->display->dpy; |
434 | Display *dpy = s->display->dpy; |
435 | Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); |
435 | Picture src = XRenderCreatePicture (dpy, pm, format, 0, 0); |
436 | Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0); |
436 | Picture dst = XRenderCreatePicture (dpy, img->pm, new_format, 0, 0); |
437 | int op = PictOpSrc; |
437 | int op = PictOpSrc; |
438 | |
438 | |
439 | printf ("fa %x,%x fb %x,%x\n", f->direct.alpha, f->direct.alpha_mask, new_format->direct.alpha, new_format->direct.alpha_mask);//D |
|
|
440 | |
|
|
441 | if (f->direct.alpha && !new_format->direct.alpha) |
439 | if (format->direct.alphaMask && !new_format->direct.alphaMask) |
442 | { |
440 | { |
443 | // does it have to be that complicated |
441 | // does it have to be that complicated |
444 | rgba c; |
442 | rgba c; |
445 | bg.get (c); |
443 | bg.get (c); |
446 | |
444 | |
447 | XRenderColor rc = { c.r, c.g, c.b, 0xffff }; |
445 | XRenderColor rc = { c.r, c.g, c.b, 0xffff }; |
448 | |
|
|
449 | XRenderFillRectangle (dpy, PictOpSrc, dst, &mask_c, 0, 0, w, h); |
446 | XRenderFillRectangle (dpy, PictOpSrc, dst, &rc, 0, 0, w, h); |
450 | |
447 | |
451 | op = PictOpOver; |
448 | op = PictOpOver; |
452 | } |
449 | } |
453 | |
450 | |
454 | XRenderComposite (dpy, op, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); |
451 | XRenderComposite (dpy, op, src, None, dst, 0, 0, 0, 0, 0, 0, w, h); |