7 #include "x11-memdraw.h"
10 memfillcolor(Memimage *m, u32int val)
12 _memfillcolor(m, val);
15 if((val & 0xFF) == 0xFF) /* full alpha */
16 _xfillcolor(m, m->r, _rgbatoimg(m, val));
22 _xfillcolor(Memimage *m, Rectangle r, u32int v)
32 * Set up fill context appropriately.
36 if(_x.gcfill0color != v){
37 XSetForeground(_x.display, gc, v);
41 if(m->chan == CMAP8 && _x.usetable)
44 if(_x.gcfillcolor != v){
45 XSetForeground(_x.display, gc, v);
51 * XFillRectangle takes coordinates relative to image rectangle.
53 p = subpt(r.min, m->r.min);
54 XFillRectangle(_x.display, xm->pixmap, gc, p.x, p.y, Dx(r), Dy(r));