OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Classes | Macros | Typedefs | Functions
polygrf.h File Reference
#include <ossim/vpfutil/protomas.h>
#include <ossim/vpfutil/xmemory.h>

Go to the source code of this file.

Classes

struct  IPoint
 
struct  ISegment
 
struct  BresSegment
 
struct  IBox
 
struct  ITransform
 
struct  vpfPattern
 
struct  BitArray
 
struct  ArrayOfBits
 
struct  Shademap
 

Macros

#define TRANSFORMSPACE   0
 
#define USERSPACE   1
 
#define isBox(BOX)   ((BOX.delta.x >= 0)&&(BOX.delta.y >= 0))
 
#define MINIMUM(x, y)   (((x) > (y))? (y) : (x))
 
#define MAXIMUM(x, y)   (((x) < (y))? (y) : (x))
 
#define OUTSIDE(MAP, VPF_POINT_STRUCT)
 
#define OUTSIDE_X(MAP, value)   (((value)< 0)||((value)> MAP.bounding.x))
 
#define OUTSIDE_Y(MAP, value)   (((value)< 0)||((value)> MAP.bounding.y))
 
#define GETBIT(MAP, VPF_POINT_STRUCT)   (((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))])&(1<<((VPF_POINT_STRUCT.x)%8)))? 1: 0)
 
#define SETBIT(MAP, VPF_POINT_STRUCT)   ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) |= (1<<((VPF_POINT_STRUCT.x)%8)))
 
#define CLEARBIT(MAP, VPF_POINT_STRUCT)   ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) &= ~(1<<((VPF_POINT_STRUCT.x)%8)))
 
#define TOGGLEBIT(MAP, VPF_POINT_STRUCT)   ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) ^= (1<<((VPF_POINT_STRUCT.x)%8)))
 
#define LEFTBITS(INDEX)   (255&(~(255<<(1+(INDEX)))))
 
#define RIGHTBITS(INDEX)   (255&(~(255>>(8-(INDEX)))))
 
#define FILLBRESSEG(bseg, seg)
 
#define STEP(bseg)
 
#define SOLID   0
 
#define STRIPS   1
 
#define STRIPES   1
 
#define SIMPLE   2
 

Typedefs

typedef unsigned char Color
 

Functions

ISegment MakeISegment (IPoint from, IPoint to)
 
IBox MakeIBox (IPoint from, IPoint to)
 
ITransform MakeITransform (IBox from, IBox to)
 
IPoint TranslateIPoint (ITransform transform, IPoint a, int flag)
 
ISegment TranslateISegment (ITransform transform, ISegment a, int flay)
 
IBox TranslateIBox (ITransform transform, IBox a, int flag)
 
IBox AndIBox (IBox a, IBox b)
 
void SETROW (ArrayOfBits MAP, int XMIN, int XMAX, int Y)
 
void CLEARROW (ArrayOfBits MAP, int XMIN, int XMAX, int Y)
 
void TOGGLEROW (ArrayOfBits MAP, int XMIN, int XMAX, int Y)
 
void SETCOLUMN (ArrayOfBits MAP, int X, int YMIN, int YMAX)
 
void CLEARCOLUMN (ArrayOfBits MAP, int X, int YMIN, int YMAX)
 
void TOGGLECOLUMN (ArrayOfBits MAP, int X, int YMIN, int YMAX)
 
ArrayOfBits MakeArrayOfBits (int deltaX, int deltaY)
 
int FreeArrayOfBits (ArrayOfBits map)
 
int ClearArrayOfBits (ArrayOfBits map)
 
int PointGetBit (ArrayOfBits map, IPoint point)
 
int PointSetBit (ArrayOfBits map, IPoint at, int value)
 
int PointAndBit (ArrayOfBits map, IPoint at, int value)
 
int PointOrBit (ArrayOfBits map, IPoint at, int value)
 
int PointXorBit (ArrayOfBits map, IPoint at, int value)
 
int LineSetBit (ArrayOfBits map, ISegment seg, int value)
 
int LineAndBit (ArrayOfBits map, ISegment seg, int value)
 
int LineOrBit (ArrayOfBits map, ISegment seg, int value)
 
int LineXorBit (ArrayOfBits map, ISegment seg, int value)
 
int BoxSetBit (ArrayOfBits map, IBox box, int value)
 
int BoxAndBit (ArrayOfBits map, IBox box, int value)
 
int BoxOrBit (ArrayOfBits map, IBox box, int value)
 
int BoxXorBit (ArrayOfBits map, IBox box, int value)
 
int TrapezoidSetBit (ArrayOfBits map, ISegment seg, int value)
 
int TrapezoidAndBit (ArrayOfBits map, ISegment seg, int value)
 
int TrapezoidOrBit (ArrayOfBits map, ISegment seg, int value)
 
int TrapezoidXorBit (ArrayOfBits map, ISegment seg, int value)
 
int SetArrayOfBits (ArrayOfBits map, int value)
 
int AndArrayOfBits (ArrayOfBits map, int value)
 
int OrArrayOfBits (ArrayOfBits map, ISegment seg, int value)
 
int XorArrayOfBits (ArrayOfBits map, ISegment seg, int value)
 
ShademapOpenShade (IBox bounding, IBox window, Color line, vpfPattern fill)
 
int ModifyShade (Shademap *smap, Color line, vpfPattern fill)
 
int WriteShade (Shademap *smap, IPoint point)
 
int CloseLoop (Shademap *smap)
 
int CloseShade (Shademap *smap)
 
int OutShade (Shademap *smap)
 
vpfPattern MakePattern (int ll, int lr, int ul, int ur)
 

Macro Definition Documentation

◆ CLEARBIT

#define CLEARBIT (   MAP,
  VPF_POINT_STRUCT 
)    ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) &= ~(1<<((VPF_POINT_STRUCT.x)%8)))

Definition at line 201 of file polygrf.h.

◆ FILLBRESSEG

#define FILLBRESSEG (   bseg,
  seg 
)
Value:
{ \
int tempx,tempy; \
bseg.signs.x = (seg.delta.x < 0) ? -1: 1; \
bseg.signs.y = (seg.delta.y < 0) ? -1: 1; \
tempx = seg.delta.x * bseg.signs.x; \
tempy = seg.delta.y * bseg.signs.y; \
bseg.at = seg.origin; \
if (tempy > tempx) \
{ \
bseg.Eprim = (tempx<<1) - tempy; \
bseg.errors.inc = (tempx<<1); \
bseg.errors.step = (tempx<<1) - (tempy<<1); \
bseg.maximum = tempy; \
bseg.toggle = 1; \
} \
else \
{ \
bseg.Eprim = (tempy<<1) - tempx; \
bseg.errors.inc = (tempy<<1); \
bseg.errors.step = (tempy<<1) - (tempx<<1); \
bseg.maximum = tempx; \
bseg.toggle = 0; \
} \
}
if(yy_init)

Definition at line 210 of file polygrf.h.

◆ GETBIT

#define GETBIT (   MAP,
  VPF_POINT_STRUCT 
)    (((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))])&(1<<((VPF_POINT_STRUCT.x)%8)))? 1: 0)

Definition at line 195 of file polygrf.h.

◆ isBox

#define isBox (   BOX)    ((BOX.delta.x >= 0)&&(BOX.delta.y >= 0))

Definition at line 96 of file polygrf.h.

◆ LEFTBITS

#define LEFTBITS (   INDEX)    (255&(~(255<<(1+(INDEX)))))

Definition at line 207 of file polygrf.h.

◆ MAXIMUM

#define MAXIMUM (   x,
  y 
)    (((x) < (y))? (y) : (x))

Definition at line 184 of file polygrf.h.

◆ MINIMUM

#define MINIMUM (   x,
  y 
)    (((x) > (y))? (y) : (x))

Definition at line 183 of file polygrf.h.

◆ OUTSIDE

#define OUTSIDE (   MAP,
  VPF_POINT_STRUCT 
)
Value:
((VPF_POINT_STRUCT.x < 0)|| \
(VPF_POINT_STRUCT.y < 0)|| \
(VPF_POINT_STRUCT.x > MAP.bounding.x)|| \
(VPF_POINT_STRUCT.y > MAP.bounding.y))

Definition at line 186 of file polygrf.h.

◆ OUTSIDE_X

#define OUTSIDE_X (   MAP,
  value 
)    (((value)< 0)||((value)> MAP.bounding.x))

Definition at line 192 of file polygrf.h.

◆ OUTSIDE_Y

#define OUTSIDE_Y (   MAP,
  value 
)    (((value)< 0)||((value)> MAP.bounding.y))

Definition at line 193 of file polygrf.h.

◆ RIGHTBITS

#define RIGHTBITS (   INDEX)    (255&(~(255>>(8-(INDEX)))))

Definition at line 208 of file polygrf.h.

◆ SETBIT

#define SETBIT (   MAP,
  VPF_POINT_STRUCT 
)    ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) |= (1<<((VPF_POINT_STRUCT.x)%8)))

Definition at line 198 of file polygrf.h.

◆ SIMPLE

#define SIMPLE   2

Definition at line 401 of file polygrf.h.

◆ SOLID

#define SOLID   0

Definition at line 398 of file polygrf.h.

◆ STEP

#define STEP (   bseg)
Value:
if (bseg.maximum){ \
if(bseg.Eprim<0) \
{ \
bseg.Eprim += bseg.errors.inc; \
if (bseg.toggle) \
bseg.at.y += bseg.signs.y; \
else \
bseg.at.x += bseg.signs.x; \
bseg.maximum--; \
} \
else \
{ \
bseg.Eprim += bseg.errors.step; \
bseg.at.x += bseg.signs.x; \
bseg.at.y += bseg.signs.y; \
bseg.maximum--; \
} \
}

Definition at line 238 of file polygrf.h.

Referenced by ossimImageData::createTestTile(), and ossimH5GridModel::getWktFootprint().

◆ STRIPES

#define STRIPES   1

Definition at line 400 of file polygrf.h.

◆ STRIPS

#define STRIPS   1

Definition at line 399 of file polygrf.h.

◆ TOGGLEBIT

#define TOGGLEBIT (   MAP,
  VPF_POINT_STRUCT 
)    ((MAP.array[(((VPF_POINT_STRUCT.y)*(MAP.rowcount))+((VPF_POINT_STRUCT.x)>>3))]) ^= (1<<((VPF_POINT_STRUCT.x)%8)))

Definition at line 204 of file polygrf.h.

◆ TRANSFORMSPACE

#define TRANSFORMSPACE   0

Definition at line 49 of file polygrf.h.

◆ USERSPACE

#define USERSPACE   1

Definition at line 50 of file polygrf.h.

Typedef Documentation

◆ Color

typedef unsigned char Color

Definition at line 52 of file polygrf.h.

Function Documentation

◆ AndArrayOfBits()

int AndArrayOfBits ( ArrayOfBits  map,
int  value 
)

◆ AndIBox()

IBox AndIBox ( IBox  a,
IBox  b 
)

◆ BoxAndBit()

int BoxAndBit ( ArrayOfBits  map,
IBox  box,
int  value 
)

◆ BoxOrBit()

int BoxOrBit ( ArrayOfBits  map,
IBox  box,
int  value 
)

◆ BoxSetBit()

int BoxSetBit ( ArrayOfBits  map,
IBox  box,
int  value 
)

◆ BoxXorBit()

int BoxXorBit ( ArrayOfBits  map,
IBox  box,
int  value 
)

◆ ClearArrayOfBits()

int ClearArrayOfBits ( ArrayOfBits  map)

◆ CLEARCOLUMN()

void CLEARCOLUMN ( ArrayOfBits  MAP,
int  X,
int  YMIN,
int  YMAX 
)

◆ CLEARROW()

void CLEARROW ( ArrayOfBits  MAP,
int  XMIN,
int  XMAX,
int  Y 
)

◆ CloseLoop()

int CloseLoop ( Shademap smap)

◆ CloseShade()

int CloseShade ( Shademap smap)

◆ FreeArrayOfBits()

int FreeArrayOfBits ( ArrayOfBits  map)

◆ LineAndBit()

int LineAndBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ LineOrBit()

int LineOrBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ LineSetBit()

int LineSetBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ LineXorBit()

int LineXorBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ MakeArrayOfBits()

ArrayOfBits MakeArrayOfBits ( int  deltaX,
int  deltaY 
)

◆ MakeIBox()

IBox MakeIBox ( IPoint  from,
IPoint  to 
)

◆ MakeISegment()

ISegment MakeISegment ( IPoint  from,
IPoint  to 
)

◆ MakeITransform()

ITransform MakeITransform ( IBox  from,
IBox  to 
)

◆ MakePattern()

vpfPattern MakePattern ( int  ll,
int  lr,
int  ul,
int  ur 
)

◆ ModifyShade()

int ModifyShade ( Shademap smap,
Color  line,
vpfPattern  fill 
)

◆ OpenShade()

Shademap* OpenShade ( IBox  bounding,
IBox  window,
Color  line,
vpfPattern  fill 
)

◆ OrArrayOfBits()

int OrArrayOfBits ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ OutShade()

int OutShade ( Shademap smap)

◆ PointAndBit()

int PointAndBit ( ArrayOfBits  map,
IPoint  at,
int  value 
)

◆ PointGetBit()

int PointGetBit ( ArrayOfBits  map,
IPoint  point 
)

◆ PointOrBit()

int PointOrBit ( ArrayOfBits  map,
IPoint  at,
int  value 
)

◆ PointSetBit()

int PointSetBit ( ArrayOfBits  map,
IPoint  at,
int  value 
)

◆ PointXorBit()

int PointXorBit ( ArrayOfBits  map,
IPoint  at,
int  value 
)

◆ SetArrayOfBits()

int SetArrayOfBits ( ArrayOfBits  map,
int  value 
)

◆ SETCOLUMN()

void SETCOLUMN ( ArrayOfBits  MAP,
int  X,
int  YMIN,
int  YMAX 
)

◆ SETROW()

void SETROW ( ArrayOfBits  MAP,
int  XMIN,
int  XMAX,
int  Y 
)

◆ TOGGLECOLUMN()

void TOGGLECOLUMN ( ArrayOfBits  MAP,
int  X,
int  YMIN,
int  YMAX 
)

◆ TOGGLEROW()

void TOGGLEROW ( ArrayOfBits  MAP,
int  XMIN,
int  XMAX,
int  Y 
)

◆ TranslateIBox()

IBox TranslateIBox ( ITransform  transform,
IBox  a,
int  flag 
)

◆ TranslateIPoint()

IPoint TranslateIPoint ( ITransform  transform,
IPoint  a,
int  flag 
)

◆ TranslateISegment()

ISegment TranslateISegment ( ITransform  transform,
ISegment  a,
int  flay 
)

◆ TrapezoidAndBit()

int TrapezoidAndBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ TrapezoidOrBit()

int TrapezoidOrBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ TrapezoidSetBit()

int TrapezoidSetBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ TrapezoidXorBit()

int TrapezoidXorBit ( ArrayOfBits  map,
ISegment  seg,
int  value 
)

◆ WriteShade()

int WriteShade ( Shademap smap,
IPoint  point 
)

◆ XorArrayOfBits()

int XorArrayOfBits ( ArrayOfBits  map,
ISegment  seg,
int  value 
)