Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
xgr.c File Reference
#include "ds_extern.h"
#include "ds_proto.h"

Go to the source code of this file.

Macros

#define TRUE   1
 
#define FALSE   0
 
#define DEFINE_COLORS   TRUE
 
#define insque(e, p)
 
#define remque(e)
 
#define MAX_GRAY_SCALE   256
 

Functions

static int drawYticks ()
 
static int tickGet ()
 
static int find_ticks ()
 
static int allocColors ()
 
int xgr_graphInit (struct XGR_ *s)
 
int xgr_setNumColors (int n)
 
int xgr_setColorChoice (int c)
 
int loadGrayScale (struct XGR_ *s)
 
int flame (double a, double b, double x)
 
int loadFlameScale (struct XGR_ *s, int cindx)
 
int loadPseudoScale (struct XGR_ *s)
 
int xgr_freeWindows (struct XGR_ *s)
 
int xgr_setWindowSize (char *name, float x, float y)
 
int xgr_setCurWindow (int win, int which)
 
int xgr_pixmapToWindow (char *name)
 
int xgr_mapUnmapWindow (char *name, int map)
 
int xgr_findWindow (Display *dpy, Window win, struct WINDOW **w)
 
int xgr_putXimage (char *win_name, float fx, float fy, int w, int h, unsigned char *data)
 
int xgr_reSizeProc (Window window, int width, int height)
 
int xgr_eventProc (XEvent *event, Window window, unsigned int mask)
 
int xgr_rePaintProc (Window window)
 
struct WINDOW * xgr_getWin (Window win)
 
int xgr_hardCopy (char *win, int land, int rev, char *file)
 
int xgr_makeGif (char *win, char *file)
 
int xgr_clearScreen ()
 
int xgr_clearArea (float x, float y, float dx, float dy)
 
int find_close_color (Display *dpy, Colormap cmap, XColor *exact_color, char *color)
 
int xgr_drawLine (float *xdata, float *ydata, int n, int color)
 
int xgr_drawLineDirect (float xmin, float xmax, float ymin, float ymax, float *xdata, float *ydata, int n, int color)
 
int xgr_drawPoints (float xmin, float xmax, float ymin, float ymax, float *xdata, float *ydata, int n, int color)
 
int xgr_drawBin (float *xdata, float *ydata, int n, int color)
 
int xgr_drawGrid (float f1b, float f1e, float f2b, float f2e, int n1, int n2, int dx, int dy, int tick, int label, int clr1, int clr2, int format)
 
int xgr_drawBox (float x, float y, float x2, float y2, int color)
 
int xgr_setBox (float x, float y, float dx, float dy)
 
int xgr_drawFillBox (float xmin, float xmax, float ymin, float ymax, float xl, float yt, float xr, float yb, int color)
 
int xgr_drawRectangle (float xmin, float xmax, float ymin, float ymax, float xl, float yt, float xr, float yb, int color, int bold)
 
int xgr_drawTextInGrid (float xmin, float xmax, float ymin, float ymax, float x, float y, char *msg, int color, int f)
 
int xgr_drawCircle (float xmin, float xmax, float ymin, float ymax, float x, float y, float w, float h, int color, int size)
 
int xgr_drawPosText (float x, float y, char *msg, int clr, int f)
 
int xgr_drawText (float x, float y, char *msg, int clr, int f)
 
int xgr_drawTextClear (float x, float y, char *msg, int clr, int f)
 
int xgr_drawPoint (float *xdata, float *ydata, int n, float xmin, float xmax, char *msg, int color, int f)
 
int xgr_drawOn (float x, float y, int n, float xmin, float xmax, char *msg, int color, int f)
 
int xgr_drawLabel (char *b1, char *b2, char *b3, int color)
 
int xgr_setFont (struct XGR_ *s, int f)
 
int setInValid (int w)
 
char ** findFixedFonts (Display *dpy, int *num)
 
int strcmp ()
 
int charcompare (char **s1, char **s2)
 
int setFrameFooter (char *msg, int lr)
 
int xgr_checkForEvents ()
 

Variables

int doColor = PSEUDO
 
int mcount = 0
 
int xntick
 
int yntick
 
int doFocal = 0
 
int noXTick = 0
 
int noYTick = 0
 
int noPlot = 0
 
int xgr_hardFont = 0
 
int fixedZero = 0
 
float globalStart
 
float globalStop
 
float globalYMin
 
float globalYMax
 
int globalScale
 
int drawGrid
 
int currentColor
 
int lockScale = 0
 
int focalTicks
 
struct XGR_HEAD xgr_head
 
char prgName [80]
 
int max_gray_scale = MAX_GRAY_SCALE
 
int newMaxGrayScale = MAX_GRAY_SCALE
 
struct RGB colormap [MAX_GRAY_SCALE]
 

Macro Definition Documentation

#define DEFINE_COLORS   TRUE

Definition at line 5 of file xgr.c.

#define FALSE   0

Definition at line 3 of file xgr.c.

#define insque (   e,
  p 
)
Value:
(e)->next=((e)->prev=(p))->next; \
(p)->next=(p)->next->prev=(e)

Definition at line 51 of file xgr.c.

#define MAX_GRAY_SCALE   256

Definition at line 64 of file xgr.c.

#define remque (   e)
Value:
(e)->prev->next=(e)->next; \
(e)->next->prev=(e)->prev; \
(e)->next = (e)->prev = (e)

Definition at line 60 of file xgr.c.

#define TRUE   1

Definition at line 2 of file xgr.c.

Function Documentation

static int allocColors ( )
int charcompare ( char **  s1,
char **  s2 
)

Definition at line 2458 of file xgr.c.

static int drawYticks ( )
int find_close_color ( Display *  dpy,
Colormap  cmap,
XColor *  exact_color,
char *  color 
)

Definition at line 981 of file xgr.c.

static int find_ticks ( )
char** findFixedFonts ( Display *  dpy,
int *  num 
)

Definition at line 2351 of file xgr.c.

int flame ( double  a,
double  b,
double  x 
)

Definition at line 195 of file xgr.c.

int loadFlameScale ( struct XGR_ *  s,
int  cindx 
)

Definition at line 215 of file xgr.c.

int loadGrayScale ( struct XGR_ *  s)

Definition at line 168 of file xgr.c.

int loadPseudoScale ( struct XGR_ *  s)

Definition at line 279 of file xgr.c.

int setFrameFooter ( char *  msg,
int  lr 
)

Definition at line 2514 of file xgr.c.

int setInValid ( int  w)

Definition at line 2333 of file xgr.c.

int strcmp ( )
static int tickGet ( )
int xgr_checkForEvents ( void  )

Definition at line 2547 of file xgr.c.

int xgr_clearArea ( float  x,
float  y,
float  dx,
float  dy 
)

Definition at line 949 of file xgr.c.

int xgr_clearScreen ( void  )

Definition at line 921 of file xgr.c.

int xgr_drawBin ( float *  xdata,
float *  ydata,
int  n,
int  color 
)

Definition at line 1455 of file xgr.c.

int xgr_drawBox ( float  x,
float  y,
float  x2,
float  y2,
int  color 
)

Definition at line 1740 of file xgr.c.

int xgr_drawCircle ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float  x,
float  y,
float  w,
float  h,
int  color,
int  size 
)

Definition at line 1938 of file xgr.c.

int xgr_drawFillBox ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float  xl,
float  yt,
float  xr,
float  yb,
int  color 
)

Definition at line 1802 of file xgr.c.

int xgr_drawGrid ( float  f1b,
float  f1e,
float  f2b,
float  f2e,
int  n1,
int  n2,
int  dx,
int  dy,
int  tick,
int  label,
int  clr1,
int  clr2,
int  format 
)

Definition at line 1504 of file xgr.c.

int xgr_drawLabel ( char *  b1,
char*  b2,
char*  b3,
int  color 
)

Definition at line 2164 of file xgr.c.

int xgr_drawLine ( float *  xdata,
float *  ydata,
int  n,
int  color 
)

Definition at line 1124 of file xgr.c.

int xgr_drawLineDirect ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float *  xdata,
float *  ydata,
int  n,
int  color 
)

Definition at line 1234 of file xgr.c.

int xgr_drawOn ( float  x,
float  y,
int  n,
float  xmin,
float  xmax,
char *  msg,
int  color,
int  f 
)

Definition at line 2126 of file xgr.c.

int xgr_drawPoint ( float *  xdata,
float *  ydata,
int  n,
float  xmin,
float  xmax,
char *  msg,
int  color,
int  f 
)

Definition at line 2083 of file xgr.c.

int xgr_drawPoints ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float *  xdata,
float *  ydata,
int  n,
int  color 
)

Definition at line 1279 of file xgr.c.

int xgr_drawPosText ( float  x,
float  y,
char *  msg,
int  clr,
int  f 
)

Definition at line 1995 of file xgr.c.

int xgr_drawRectangle ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float  xl,
float  yt,
float  xr,
float  yb,
int  color,
int  bold 
)

Definition at line 1842 of file xgr.c.

int xgr_drawText ( float  x,
float  y,
char *  msg,
int  clr,
int  f 
)

Definition at line 2028 of file xgr.c.

int xgr_drawTextClear ( float  x,
float  y,
char *  msg,
int  clr,
int  f 
)

Definition at line 2055 of file xgr.c.

int xgr_drawTextInGrid ( float  xmin,
float  xmax,
float  ymin,
float  ymax,
float  x,
float  y,
char *  msg,
int  color,
int  f 
)

Definition at line 1893 of file xgr.c.

int xgr_eventProc ( XEvent *  event,
Window  window,
unsigned int  mask 
)

Definition at line 762 of file xgr.c.

int xgr_findWindow ( Display *  dpy,
Window  win,
struct WINDOW **  w 
)

Definition at line 602 of file xgr.c.

int xgr_freeWindows ( struct XGR_ *  s)

Definition at line 348 of file xgr.c.

struct WINDOW* xgr_getWin ( Window  win)

Definition at line 826 of file xgr.c.

int xgr_graphInit ( struct XGR_ *  s)

Definition at line 71 of file xgr.c.

int xgr_hardCopy ( char *  win,
int  land,
int  rev,
char *  file 
)

Definition at line 851 of file xgr.c.

int xgr_makeGif ( char *  win,
char *  file 
)

Definition at line 887 of file xgr.c.

int xgr_mapUnmapWindow ( char *  name,
int  map 
)

Definition at line 568 of file xgr.c.

int xgr_pixmapToWindow ( char *  name)

Definition at line 530 of file xgr.c.

int xgr_putXimage ( char *  win_name,
float  fx,
float  fy,
int  w,
int  h,
unsigned char *  data 
)

Definition at line 639 of file xgr.c.

int xgr_rePaintProc ( Window  window)

Definition at line 794 of file xgr.c.

int xgr_reSizeProc ( Window  window,
int  width,
int  height 
)

Definition at line 698 of file xgr.c.

int xgr_setBox ( float  x,
float  y,
float  dx,
float  dy 
)

Definition at line 1782 of file xgr.c.

int xgr_setColorChoice ( int  c)

Definition at line 106 of file xgr.c.

int xgr_setCurWindow ( int  win,
int  which 
)

Definition at line 483 of file xgr.c.

int xgr_setFont ( struct XGR_ *  s,
int  f 
)

Definition at line 2294 of file xgr.c.

int xgr_setNumColors ( int  n)

Definition at line 93 of file xgr.c.

int xgr_setWindowSize ( char *  name,
float  x,
float  y 
)

Definition at line 381 of file xgr.c.

Variable Documentation

struct RGB colormap[MAX_GRAY_SCALE]

Definition at line 69 of file xgr.c.

int currentColor

Definition at line 29 of file xgr.c.

int doColor = PSEUDO

Definition at line 13 of file xgr.c.

int doFocal = 0

Definition at line 17 of file xgr.c.

int drawGrid

Definition at line 29 of file xgr.c.

int fixedZero = 0

Definition at line 22 of file xgr.c.

int focalTicks
int globalScale

Definition at line 29 of file xgr.c.

float globalStart

Definition at line 26 of file xgr.c.

float globalStop

Definition at line 26 of file xgr.c.

float globalYMax

Definition at line 27 of file xgr.c.

float globalYMin

Definition at line 27 of file xgr.c.

int lockScale = 0

Definition at line 31 of file xgr.c.

int max_gray_scale = MAX_GRAY_SCALE

Definition at line 66 of file xgr.c.

int mcount = 0

Definition at line 14 of file xgr.c.

int newMaxGrayScale = MAX_GRAY_SCALE

Definition at line 67 of file xgr.c.

int noPlot = 0

Definition at line 20 of file xgr.c.

int noXTick = 0

Definition at line 18 of file xgr.c.

int noYTick = 0

Definition at line 19 of file xgr.c.

char prgName[80]

Definition at line 38 of file xgr.c.

int xgr_hardFont = 0

Definition at line 21 of file xgr.c.

struct XGR_HEAD xgr_head

Definition at line 36 of file xgr.c.

int xntick

Definition at line 16 of file xgr.c.

int yntick

Definition at line 16 of file xgr.c.