Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs
xregion.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Box
struct  RECTANGLE
struct  _XRegion
struct  _POINTBLOCK

Defines

#define TRUE   1
#define FALSE   0
#define MAXSHORT   32767
#define MINSHORT   -MAXSHORT
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
#define EXTENTCHECK(r1, r2)
#define EXTENTS(r, idRect)
#define MEMCHECK(reg, rect, firstrect)
#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)
#define ADDRECT(reg, r, rx1, ry1, rx2, ry2)
#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2)
#define EMPTY_REGION(pReg)   pReg->numRects = 0
#define REGION_NOT_EMPTY(pReg)   pReg->numRects
#define INBOX(r, x, y)
#define NUMPTSTOBUFFER   200

Typedefs

typedef struct Box BOX
typedef struct Box BoxRec
typedef struct BoxBoxPtr
typedef struct RECTANGLE RectangleRec
typedef struct RECTANGLERectanglePtr
typedef struct _XRegion REGION
typedef struct _POINTBLOCK POINTBLOCK

Class Documentation

struct Box

Definition at line 29 of file xregion.h.

Class Members
short x1
short x2
short y1
short y2
struct RECTANGLE

Definition at line 33 of file xregion.h.

Class Members
short height
short width
short x
short y
struct _XRegion

Definition at line 63 of file xregion.h.

Collaboration diagram for _XRegion:
Class Members
BOX extents
long numRects
BOX * rects
long size
struct _POINTBLOCK

Definition at line 172 of file xregion.h.

Collaboration diagram for _POINTBLOCK:
Class Members
struct _POINTBLOCK * next
XPoint pts

Define Documentation

#define ADDRECT (   reg,
  r,
  rx1,
  ry1,
  rx2,
  ry2 
)
Value:
{\
    if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\
        CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
              (r)->x1 = (rx1);\
              (r)->y1 = (ry1);\
              (r)->x2 = (rx2);\
              (r)->y2 = (ry2);\
              EXTENTS((r), (reg));\
              (reg)->numRects++;\
              (r)++;\
            }\
        }

Definition at line 124 of file xregion.h.

#define ADDRECTNOX (   reg,
  r,
  rx1,
  ry1,
  rx2,
  ry2 
)
Value:
{\
            if ((rx1 < rx2) && (ry1 < ry2) &&\
                CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
              (r)->x1 = (rx1);\
              (r)->y1 = (ry1);\
              (r)->x2 = (rx2);\
              (r)->y2 = (ry2);\
              (reg)->numRects++;\
              (r)++;\
            }\
        }

Definition at line 140 of file xregion.h.

#define CHECK_PREVIOUS (   Reg,
  R,
  Rx1,
  Ry1,
  Rx2,
  Ry2 
)
Value:
(!(((Reg)->numRects > 0)&&\
                  ((R-1)->y1 == (Ry1)) &&\
                  ((R-1)->y2 == (Ry2)) &&\
                  ((R-1)->x1 <= (Rx1)) &&\
                  ((R-1)->x2 >= (Rx2))))

Definition at line 116 of file xregion.h.

#define EMPTY_REGION (   pReg)    pReg->numRects = 0

Definition at line 152 of file xregion.h.

#define EXTENTCHECK (   r1,
  r2 
)
Value:
((r1)->x2 > (r2)->x1 && \
        (r1)->x1 < (r2)->x2 && \
        (r1)->y2 > (r2)->y1 && \
        (r1)->y1 < (r2)->y2)

Definition at line 78 of file xregion.h.

#define EXTENTS (   r,
  idRect 
)
Value:
{\
            if((r)->x1 < (idRect)->extents.x1)\
              (idRect)->extents.x1 = (r)->x1;\
            if((r)->y1 < (idRect)->extents.y1)\
              (idRect)->extents.y1 = (r)->y1;\
            if((r)->x2 > (idRect)->extents.x2)\
              (idRect)->extents.x2 = (r)->x2;\
            if((r)->y2 > (idRect)->extents.y2)\
              (idRect)->extents.y2 = (r)->y2;\
        }

Definition at line 87 of file xregion.h.

#define FALSE   0

Definition at line 43 of file xregion.h.

#define INBOX (   r,
  x,
  y 
)
Value:
( ( ((r).x2 >  x)) && \
        ( ((r).x1 <= x)) && \
        ( ((r).y2 >  y)) && \
        ( ((r).y1 <= y)) )

Definition at line 156 of file xregion.h.

#define MAX (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 52 of file xregion.h.

#define MAXSHORT   32767

Definition at line 46 of file xregion.h.

#define MEMCHECK (   reg,
  rect,
  firstrect 
)
Value:
{\
        if ((reg)->numRects >= ((reg)->size - 1)){\
          (firstrect) = (BOX *) Xrealloc \
          ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\
          if ((firstrect) == 0)\
            return(0);\
          (reg)->size *= 2;\
          (rect) = &(firstrect)[(reg)->numRects];\
         }\
       }

Definition at line 101 of file xregion.h.

#define MIN (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 55 of file xregion.h.

Definition at line 49 of file xregion.h.

Definition at line 166 of file xregion.h.

#define REGION_NOT_EMPTY (   pReg)    pReg->numRects

Definition at line 154 of file xregion.h.

#define TRUE   1

Definition at line 41 of file xregion.h.


Typedef Documentation

typedef struct Box BOX
typedef struct Box * BoxPtr
typedef struct Box BoxRec
typedef struct _POINTBLOCK POINTBLOCK
typedef struct RECTANGLE * RectanglePtr
typedef struct RECTANGLE RectangleRec
typedef struct _XRegion REGION