1
// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
3
// This file is part of the VNC system.
5
// The VNC system is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 2 of the License, or
8
// (at your option) any later version.
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20
// TightVNC distribution homepage on the Web: http://www.tightvnc.com/
22
// If the source code for the VNC system is not available from the place
23
// whence you received this file, check http://www.uk.research.att.com/vnc or contact
24
// the authors on vnc@uk.research.att.com for information on obtaining it.
29
// The vncRegion object turns a number of rectangular regions
30
// into a list of distinct, non-overlapping regions.
34
#if !defined(VNCREGION_DEFINED)
35
#define VNCREGION_DEFINED
51
// Create/Destroy methods
55
void AddRect(const RECT &rect); // Add another rectangle to the regions
56
void AddRect(RECT rect, int xoffset, int yoffset); // ... with offset
57
void SubtractRect(RECT &rect); // Subtract a rectangle from the regions
58
void Clear(); // Clear the current set of rectangles
59
inline BOOL IsEmpty() { // Is the region empty?
60
return region == NULL;
62
void Combine(vncRegion &rgn); // Combine with another region
63
void Intersect(vncRegion &rgn); // Intersect with another region
64
void Subtract(vncRegion &rgn); // Subtract another region from this one
66
// Rectangle retrieval routines - return FALSE if no rects returned!
67
// Note that these routines ADD rectangles to existing lists...
68
BOOL Rectangles(rectlist &rects); // Just return the rects
69
BOOL Rectangles(rectlist &rects, RECT &cliprect); // Return all rects within the clip region
73
HRGN region; // Region used internally
76
#endif // VNCREGION_DEFINED