projects
/
winnie
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed grab win initialization
[winnie]
/
src
/
gfx.cc
diff --git
a/src/gfx.cc
b/src/gfx.cc
index
1da2953
..
f0be460
100644
(file)
--- a/
src/gfx.cc
+++ b/
src/gfx.cc
@@
-3,18
+3,6
@@
#include "geom.h"
#include "gfx.h"
#include "geom.h"
#include "gfx.h"
-static Rect clipping_rect;
-
-void set_clipping_rect(const Rect &rect)
-{
- clipping_rect = rect_intersection(rect, get_screen_size());
-}
-
-const Rect &get_clipping_rect()
-{
- return clipping_rect;
-}
-
void clear_screen(int r, int g, int b)
{
Rect screen_rect = get_screen_size();
void clear_screen(int r, int g, int b)
{
Rect screen_rect = get_screen_size();
@@
-25,6
+13,7
@@
void fill_rect(const Rect &rect, int r, int g, int b)
{
Rect drect = rect;
Rect screen_rect = get_screen_size();
{
Rect drect = rect;
Rect screen_rect = get_screen_size();
+ Rect clipping_rect = get_clipping_rect();
if(drect.x < clipping_rect.x) {
drect.width -= clipping_rect.x - drect.x;
if(drect.x < clipping_rect.x) {
drect.width -= clipping_rect.x - drect.x;