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
11typedef struct _rect {
12 int x1;
13 int y1;
14 int x2;
15 int y2;
16} sraRect;
17
18typedef struct sraRegion sraRegion;
19
20/* -=- Region manipulation functions */
21
22extern sraRegion *sraRgnCreate(void);
23extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2);
25
26extern void sraRgnDestroy(sraRegion *rgn);
27extern void sraRgnMakeEmpty(sraRegion *rgn);
28extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src);
29extern void sraRgnOr(sraRegion *dst, const sraRegion *src);
30extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src);
31
32extern void sraRgnOffset(sraRegion *dst, int dx, int dy);
33
34extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect,
35 unsigned long flags);
36
37extern unsigned long sraRgnCountRects(const sraRegion *rgn);
38extern rfbBool sraRgnEmpty(const sraRegion *rgn);
39
40extern sraRegion *sraRgnBBox(const sraRegion *src);
41
42/* -=- rectangle iterator */
43
44typedef struct sraRectangleIterator {
47 struct sraSpan** sPtrs;
49
54
55void sraRgnPrint(const sraRegion *s);
56
57/* -=- Rectangle clipper (for speed) */
58
59extern rfbBool sraClipRect(int *x, int *y, int *w, int *h,
60 int cx, int cy, int cw, int ch);
61
62extern 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)
sraRegion * sraRgnCreateRgn(const sraRegion *src)
void sraRgnOffset(sraRegion *dst, int dx, int dy)
struct sraRegion sraRegion
Definition: rfbregion.h:18
sraRegion * sraRgnCreate(void)
void sraRgnDestroy(sraRegion *rgn)
rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src)
void sraRgnOr(sraRegion *dst, 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)
sraRegion * sraRgnBBox(const sraRegion *src)
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)
sraRectangleIterator * sraRgnGetReverseIterator(sraRegion *s, rfbBool reverseX, rfbBool reverseY)
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