ref: 883ded7b49fc9775d5bca5cb03dcec6d006dc92d
parent: 09d3dbc74199e0c181e09f51c8f88e94c1c6adcb
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Mon Aug 12 19:31:53 EDT 2013
catclock: protect black border with clip rectangle and dont print when window is too small
--- a/sys/src/games/catclock.c
+++ b/sys/src/games/catclock.c
@@ -83,7 +83,6 @@
Rectangle r = Rect(0,0,Dx(screen->r), Dy(screen->r));
catoffs.x=(Dx(r)-CATWID)/2;
catoffs.y=(Dy(r)-CATHGT)/2;
- if(!ptinrect(catoffs, r)) fprint(2, "catclock: window too small, resize!\n");
xredraw=1;
}
@@ -227,6 +226,7 @@
if(xredraw){draw(screen, screen->r, display->white, nil, ZP);
border(screen, screen->r, 4, display->black, ZP);
+ replclipr(screen, 0, insetrect(screen->r, 4));
//bitblt(&screen, screen.r.min, &screen, screen.r, Zero);
//border(&screen, screen.r, 4, F);
}
--
⑨