History

bleh, still have to .keep some dirs.

initial commit

echoline committed 11 years ago

Commit 3833b13No parent (first commit)14470 files · +3080158 −-4496Browse files

Showing the changes to sys/src/cmd/plot/libplot/mplot.h (1 of 14470 files). Show all

Unified · Split

sys/src/cmd/plot/libplot/mplot.h+56−0
@@ -0,0 +1,56 @@
1/*
2 * This file is part of the UCB release of Plan 9. It is subject to the license
3 * terms in the LICENSE file found in the top-level directory of this
4 * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
5 * part of the UCB release of Plan 9, including this file, may be copied,
6 * modified, propagated, or distributed except according to the terms contained
7 * in the LICENSE file.
8 */
9
10#include <u.h>
11#include <libc.h>
12#include <stdio.h>
13#include <draw.h>
14#include <event.h>
15#define SCX(A) ((((A) - e1->xmin)*e1->scalex + e1->left)+.5)
16#define SCY(A) ((((A) - e1->ymin)*e1->scaley + e1->bottom)+.5)
17#define SCR(A) ((A)*e1->scalex+.5)
18#define unorm(y) (double)(e1->sidey - y)
19#define BIGINT 0x3FFFFFFF /* a large, but valid, int */
20extern struct penvir {
21 double left, bottom;
22 double xmin, ymin;
23 double scalex, scaley;
24 double sidex, sidey;
25 double copyx, copyy;
26 double quantum;
27 double grade;
28 int pgap;
29 double pslant;
30 int pmode, foregr, backgr;
31} *e0, *e1, *esave;
32#define RADIAN 57.3 /* radians per degree */
33struct seg {
34 int x, y, X, Y;
35 char stat;
36};
37
38/*
39 * display parameters
40 */
41int clipminx, clipminy, clipmaxx, clipmaxy; /* clipping rectangle */
42int mapminx, mapminy, mapmaxx, mapmaxy; /* centered square */
43/*
44 * Prototypes
45 */
46#include "../plot.h"
47void m_clrwin(int, int, int, int, int);
48void m_finish(void);
49void m_initialize(char *);
50int m_text(int, int, char *, char *, int, int, int);
51void m_vector(int, int, int, int, int);
52void m_swapbuf(void);
53void m_dblbuf(void);
54int bcolor(char *);
55void sscpy(struct penvir *, struct penvir *);
56Image *getcolor(int);