6 allocimagemix(Display *d, u32int color1, u32int color3)
12 qmask = allocimage(d, Rect(0,0,1,1), GREY8, 1, 0x3F3F3FFF);
14 if(d->screenimage->depth <= 8){ /* create a 2×2 texture */
15 t = allocimage(d, Rect(0,0,1,1), d->screenimage->chan, 0, color1);
19 b = allocimage(d, Rect(0,0,2,2), d->screenimage->chan, 1, color3);
25 draw(b, Rect(0,0,1,1), t, nil, ZP);
28 }else{ /* use a solid color, blended using alpha */
29 t = allocimage(d, Rect(0,0,1,1), d->screenimage->chan, 1, color1);
33 b = allocimage(d, Rect(0,0,1,1), d->screenimage->chan, 1, color3);
39 draw(b, b->r, t, qmask, ZP);