LibVNCServer/LibVNCClient
rfbregion.h
Go to the documentation of this file.
1 #ifndef SRAREGION_H
2 #define SRAREGION_H
3 
4 /* -=- SRA - Simple Region Algorithm
5  * A simple rectangular region implementation.
6  * Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin
7  */
8 
9 /* -=- sraRect */
10 
11 typedef struct _rect {
12  int x1;
13  int y1;
14  int x2;
15  int y2;
16 } sraRect;
17 
18 typedef struct sraRegion sraRegion;
19 
20 /* -=- Region manipulation functions */
21 
22 extern sraRegion *sraRgnCreate(void);
23 extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2);
24 extern sraRegion *sraRgnCreateRgn(const sraRegion *src);
25 
26 extern void sraRgnDestroy(sraRegion *rgn);
27 extern void sraRgnMakeEmpty(sraRegion *rgn);
28 extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src);
29 extern void sraRgnOr(sraRegion *dst, const sraRegion *src);
30 extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
31 
32 extern void sraRgnOffset(sraRegion *dst, int dx, int dy);
33 
34 extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect,
35  unsigned long flags);
36 
37 extern unsigned long sraRgnCountRects(const sraRegion *rgn);
38 extern rfbBool sraRgnEmpty(const sraRegion *rgn);
39 
40 extern sraRegion *sraRgnBBox(const sraRegion *src);
41 
42 /* -=- rectangle iterator */
43 
44 typedef struct sraRectangleIterator {
47  struct sraSpan** sPtrs;
49 
54 
55 void sraRgnPrint(const sraRegion *s);
56 
57 /* -=- Rectangle clipper (for speed) */
58 
59 extern rfbBool sraClipRect(int *x, int *y, int *w, int *h,
60  int cx, int cy, int cw, int ch);
61 
62 extern rfbBool sraClipRect2(int *x, int *y, int *x2, int *y2,
63  int cx, int cy, int cx2, int cy2);
64 
65 #endif
int y
Definition: SDLvncviewer.c:34
int x
Definition: SDLvncviewer.c:34
int8_t rfbBool
Definition: rfbproto.h:108
sraRegion * sraRgnCreateRect(int x1, int y1, int x2, int y2)
void sraRgnOffset(sraRegion *dst, int dx, int dy)
struct sraRegion sraRegion
Definition: rfbregion.h:18
sraRegion * sraRgnCreate(void)
void sraRgnDestroy(sraRegion *rgn)
sraRegion * sraRgnCreateRgn(const sraRegion *src)
rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src)
void sraRgnOr(sraRegion *dst, const sraRegion *src)
sraRegion * sraRgnBBox(const sraRegion *src)
sraRectangleIterator * sraRgnGetIterator(sraRegion *s)
void sraRgnPrint(const sraRegion *s)
rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src)
rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect, unsigned long flags)
void sraRgnReleaseIterator(sraRectangleIterator *i)
rfbBool sraClipRect(int *x, int *y, int *w, int *h, int cx, int cy, int cw, int ch)
sraRectangleIterator * sraRgnGetReverseIterator(sraRegion *s, rfbBool reverseX, rfbBool reverseY)
rfbBool sraRgnIteratorNext(sraRectangleIterator *i, sraRect *r)
rfbBool sraRgnEmpty(const sraRegion *rgn)
rfbBool sraClipRect2(int *x, int *y, int *x2, int *y2, int cx, int cy, int cx2, int cy2)
void sraRgnMakeEmpty(sraRegion *rgn)
unsigned long sraRgnCountRects(const sraRegion *rgn)
int y1
Definition: rfbregion.h:13
int x1
Definition: rfbregion.h:12
int y2
Definition: rfbregion.h:15
int x2
Definition: rfbregion.h:14
struct sraSpan ** sPtrs
Definition: rfbregion.h:47