ref: 44a8019777947ef9d686c0c21ed1ead1472eba26
parent: 77eb1803c4620ff1362e03faa8a8d674dbe11b2f
author: glenda <glenda@narshaddaa>
date: Wed Apr 26 10:25:03 EDT 2023
swap black and white to save OLED (thanks sigrid)
--- a/textimg.c
+++ b/textimg.c
@@ -108,16 +108,16 @@
// White background for the whole OLED.
// This might be incorrect, but it works cosmetically.
- img = allocmemimage(Rect(0, 0, p.x*ncharspline, f->height+lineh), GREY1);
+ img = allocmemimage(Rect(0, 0, w, f->height+lineh), GREY1);
if (!img)
sysfatal("cannot allocate memimage: %r");
- memfillcolor(img, DWhite);
+ memfillcolor(img, DBlack);
// Top line
- memimagestring(img, Pt(0, 0), memblack, ZP, f, buftop);
+ memimagestring(img, Pt(0, 0), memwhite, ZP, f, buftop);
// Bottom line
- memimagestring(img, Pt(0, h/2), memblack, ZP, f, bufbot);
+ memimagestring(img, Pt(0, h/2), memwhite, ZP, f, bufbot);
// Reform/pm requires an uncompressed plan9 bitmap image
writeuncompressed(fd, img);