1 #ifndef WELLSIMPLEDRAW_H
2 #define WELLSIMPLEDRAW_H
6 enum Canvas
{ screen
=0, pixmap
=1 };
16 int delta_x
,delta_y
; //here is the delta between dest screen and our dirty screen
19 DirtyRect() { x
=y
=delta_x
=delta_y
=0;l
=h
=0;};
20 DirtyRect(int dx
, int dy
,
22 unsigned int il
=0, unsigned int ih
=0)
24 delta_x
=dx
; delta_y
=dy
;
28 int get_src_x() { return x
;};
29 int get_src_y() { return y
;};
30 int get_dest_x() { return delta_x
+x
;};
31 int get_dest_y() { return delta_y
+y
;};
34 typedef bilist
<DirtyRect
> DirtyList
;
40 int max_x
,max_y
,min_x
,min_y
;
41 DirtyRect current_dirty
;
47 virtual void new_dirty_rec(int dx
=0, int dy
=0);
48 virtual void dirty_add_xy(int,int);
49 virtual void dirty_add_rec(DirtyRect
);
50 virtual void finish_dirty_rec();
51 virtual void clear_dirty_list();
52 virtual void draw_line(int x1
, int y1
, int x2
, int y2
, int color_idx
,
53 Canvas where
=screen
) {};
54 virtual void draw_rect(int x1
, int y1
, unsigned int il
,
55 unsigned int ih
, int color_idx
,
56 Canvas where
=screen
) {};
57 virtual void fill_rect(int x1
, int y1
, unsigned int il
,
58 unsigned int ih
, int color_idx
,
59 Canvas where
=screen
) {};
60 int get_max_dirties() { return max_dirties
;};