aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/plot/libplot/mplot.h
blob: 151b9c3566699194ebeefd079411afe7cf74bb44 (plain)
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
#include <u.h>
#include <libc.h>
#include <stdio.h>
#include <draw.h>
#include <event.h>
#define SCX(A) ((((A) - e1->xmin)*e1->scalex  + e1->left)+.5)
#define SCY(A) ((((A) - e1->ymin)*e1->scaley + e1->bottom)+.5)
#define	SCR(A) ((A)*e1->scalex+.5)
#define unorm(y)	(double)(e1->sidey - y)
#define	BIGINT	0x3FFFFFFF	/* a large, but valid, int */
extern struct penvir {
	double left, bottom;
	double xmin, ymin;
	double scalex, scaley;
	double sidex, sidey;
	double copyx, copyy;
	double quantum;
	double grade;
	int pgap;
	double pslant;
	int pmode;
	ulong foregr;
	ulong backgr;
} *e0, *e1, *esave;
#define RADIAN 57.3	/* radians per degree */
struct seg {
	int x, y, X, Y;
	char stat;
};

/*
 * display parameters
 */
extern int clipminx, clipminy, clipmaxx, clipmaxy;	/* clipping rectangle */
extern int mapminx, mapminy, mapmaxx, mapmaxy;		/* centered square */
/*
 * Prototypes
 */
#include "../plot.h"
void m_clrwin(int, int, int, int, int);
void m_finish(void);
void m_initialize(char *);
int m_text(int, int, char *, char *, int, int, int);
void m_vector(int, int, int, int, int);
void m_swapbuf(void);
void m_dblbuf(void);
int bcolor(char *);
void sscpy(struct penvir *, struct penvir *);
Image *getcolor(int);