Adding invert patch
This commit is contained in:
parent
4966f31256
commit
d26b46ffa7
8 changed files with 62 additions and 0 deletions
21
patch/invert.c
Normal file
21
patch/invert.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
static int invertcolors = 0;
|
||||
|
||||
void
|
||||
invert(const Arg *dummy)
|
||||
{
|
||||
invertcolors = !invertcolors;
|
||||
redraw();
|
||||
}
|
||||
|
||||
Color
|
||||
invertedcolor(Color *clr)
|
||||
{
|
||||
XRenderColor rc;
|
||||
Color inverted;
|
||||
rc.red = ~clr->color.red;
|
||||
rc.green = ~clr->color.green;
|
||||
rc.blue = ~clr->color.blue;
|
||||
rc.alpha = clr->color.alpha;
|
||||
XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &rc, &inverted);
|
||||
return inverted;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue