1 /*
2 	Dirty rectangle markers
3 
4 	(C) 2006 ARAnyM developer team
5 
6 	This program is free software; you can redistribute it and/or modify
7 	it under the terms of the GNU General Public License as published by
8 	the Free Software Foundation; either version 2 of the License, or
9 	(at your option) any later version.
10 
11 	This program is distributed in the hope that it will be useful,
12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 	GNU General Public License for more details.
15 
16 	You should have received a copy of the GNU General Public License
17 	along with this program; if not, write to the Free Software
18 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20 
21 #ifndef DIRTYRECTS_H
22 #define DIRTYRECTS_H 1
23 
24 /*--- DirtyRects class ---*/
25 
26 class DirtyRects
27 {
28 	protected:
29 		/* Dirty rectangle list */
30 		Uint8 *dirtyMarker;
31 		int dirtyW, dirtyH;
32 		int areaW, areaH;
33 		int minDirtX, minDirtY, maxDirtX, maxDirtY;
34 
35 	public:
36 		DirtyRects(int width = 16, int height = 16);
37 		virtual ~DirtyRects();
38 
39 		void resizeDirty(int width, int height);
40 		Uint8 *getDirtyRects(void);
41 		void setDirtyRect(int x, int y, int w, int h);
42 		void setDirtyLine(int x1, int y1, int x2, int y2);
43 		void clearDirtyRects(void);
44 		bool hasDirtyRect(void);
45 		int getDirtyWidth(void);
46 		int getDirtyHeight(void);
47 		int getMinDirtX(void);
48 		int getMinDirtY(void);
49 		int getMaxDirtX(void);
50 		int getMaxDirtY(void);
51 };
52 
53 #endif /* DIRTYRECTS_H */
54