forked from JohnWStockwellJr/SeisUnix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxplot.h
88 lines (71 loc) · 2.77 KB
/
xplot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* Copyright (c) Colorado School of Mines, 2011.*/
/* All rights reserved. */
/* include file for X graphics */
#ifndef XPLOT_H
#define XPLOT_H
/* INCLUDES */
#include "par.h" /* required for portability, do not remove */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
/* DEFINES */
/* axes drawing */
#define NONE 0
#define DOT 1
#define DASH 2
#define SOLID 3
#define NORMAL 0
#define SEISMIC 1
/* 256 pixel values for truecolor model*/
extern unsigned long truecolor_pixel[256];
/* FUNCTION PROTOTYPES */
/* windows */
Window xNewWindow (Display *dpy, int x, int y, int width, int height,
int border, int background, char *name);
/* axes drawing */
void xDrawAxesBox (Display *dpy, Window win,
int x, int y, int width, int height,
float x1beg, float x1end, float p1beg, float p1end,
float d1num, float f1num, int n1tic, int grid1, char *label1,
float x2beg, float x2end, float p2beg, float p2end,
float d2num, float f2num, int n2tic, int grid2, char *label2,
char *labelfont, char *title, char *titlefont,
char *axescolor, char *titlecolor, char *gridcolor,
int style);
void xSizeAxesBox (Display *dpy, Window win,
char *labelfont, char *titlefont, int style,
int *x, int *y, int *width, int *height);
/* images */
XImage *xNewImage (Display *dpy, unsigned long pmin, unsigned long pmax,
int width, int height, float blank, unsigned char *bytes);
/* rubberbanding box */
void xRubberBox (Display *dpy, Window win, XEvent event,
int *x, int *y, int *width, int *height);
/* colormaps */
Status xCreateRGBDefaultMap (Display *dpy, XStandardColormap *scmap);
unsigned long xGetFirstPixel (Display *dpy);
unsigned long xGetLastPixel (Display *dpy);
Colormap xCreateRGBColormap (Display *dpy, Window win,
char *str_cmap, int verbose);
Colormap xCreateHSVColormap (Display *dpy, Window win,
char *str_cmap, int verbose);
Colormap xCreateGrayColormap (Display *dpy, Window win);
Colormap xCreateHueColormap (Display *dpy, Window win);
void xDrawLegendBox(Display *dpy, Window win,
int x, int y, int width, int height,
float bclip, float wclip, char *units, char *legendfont,
char *labelfont, char *title, char *titlefont,
char *axescolor, char *titlecolor, char *gridcolor,
int style);
/* for xcontour */
void xContour(Display *dpy, Window win,GC gcc, GC gcl,
float *cp,int nx, float x[], int ny, float y[], float z[],
char lcflag,char *lcf,char *lcc, float *w, int nplaces);
/* curve drawing */
void xDrawCurve(Display *dpy, Window win,
int x, int y, int width, int height,
float x1beg, float x1end, float p1beg, float p1end,
float x2beg, float x2end, float p2beg, float p2end,
float *x1curve, float *x2curve, int ncurve,
char *curvecolor, int curvewidth, int style);
#endif /* XPLOT_H */