Showing the changes to test.c (1 of 3 files). Show all
Unified · Split
| @@ -28,11 +28,11 @@ redraw(void) · 27 unmodified lines | ||
| 28 | 28 | |
| 29 | 29 | lockdisplay(display); |
| 30 | 30 | |
| 31 | − draw(screen, screen->r, invert ? display->black : display->white, nil, ZP); | |
| 31 | + draw(screen, screen->r, display->white, nil, ZP); | |
| 32 | 32 | |
| 33 | 33 | r = rectaddpt(screen->r, offset); |
| 34 | 34 | r.max = screen->r.max; |
| 35 | − draw(screen, r, invert ? display->white : display->black, image, ZP); | |
| 35 | + draw(screen, r, fg, image, ZP); | |
| 36 | 36 | |
| 37 | 37 | r = screen->r; |
| 38 | 38 | r.min.y = r.max.y - font->height - 4; |
| @@ -108,6 +108,7 @@ threadmain(int argc, char **argv) · 69 unmodified lines | ||
| 108 | 108 | threadsetname("libpt"); |
| 109 | 109 | if(initdraw(nil, nil, "libpt") < 0) |
| 110 | 110 | sysfatal("initdraw: %r"); |
| 111 | + fg = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DBlack); | |
| 111 | 112 | display->locking = 1; |
| 112 | 113 | unlockdisplay(display); |
| 113 | 114 | if((mctl = initmouse(nil, screen)) == nil) |