6 #include "x11-memdraw.h"
9 memfillcolor(Memimage *m, u32int val)
11 _memfillcolor(m, val);
14 if((val & 0xFF) == 0xFF) /* full alpha */
15 _xfillcolor(m, m->r, _rgbatoimg(m, val));
21 _xfillcolor(Memimage *m, Rectangle r, u32int v)
31 * Set up fill context appropriately.
35 if(_x.gcfill0color != v){
36 XSetForeground(_x.display, gc, v);
40 if(m->chan == CMAP8 && _x.usetable)
43 if(_x.gcfillcolor != v){
44 XSetForeground(_x.display, gc, v);
50 * XFillRectangle takes coordinates relative to image rectangle.
52 p = subpt(r.min, m->r.min);
53 XFillRectangle(_x.display, xm->pixmap, gc, p.x, p.y, Dx(r), Dy(r));