ref: 99b7e079bf7b18384eac2440fb51a0d9a2fc65eb
parent: d9a05ced4b49ce56600d206adab35bd5a5eeee89
author: qwx <[email protected]>
date: Sat Dec 4 16:42:00 EST 2021
apply revert background patch
--- a/prez.c
+++ b/prez.c
@@ -599,7 +599,7 @@
void
usage(void)
{
- fprint(2, "usage: %s [ file ]\n", argv0);
+ fprint(2, "usage: %s [-b] [file]\n", argv0);
exits("usage");
}
@@ -609,12 +609,14 @@
char *s, buf[1024];
Rectangle r;
Image *img;
- int i, fd;
+ int i, invbg, fd;
Event e;
Mouse m;
Point p, d;
+ invbg = 0;
ARGBEGIN {
+ case 'b': invbg = 1; break;
default:
usage();
} ARGEND;
@@ -642,8 +644,13 @@
if(pal[i] == nil)
sysfatal("allocimage: %r");
}
- ink = pal[0];
- back = pal[1];
+ if(invbg){
+ ink = pal[1];
+ back = pal[0];
+ }else{
+ ink = pal[0];
+ back = pal[1];
+ }
drawpal();
center();