summaryrefslogtreecommitdiff
path: root/graphics/hpgl2ps/plotinit.c
blob: 326ffb648ab1992004a598e01d4c9f32ce4c83f5 (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
50
51
52
53
54
55
56
57
#include "defn.h"

plotinit()
{
    /*
     * Initialisation of PostScript plot macros 
     */
    MOVE = "M";
    RMOVE = "R";
    DRAW = "D";
    RDRAW = "I";

    LANDSCAPE = 1;		/* Display plot in Landscape mode */

    SCALE = 1;			/* Default Scale */

    PLOTABS = 1;		/* Absolute plot coordinates */

    PENDOWN = 0;		/* Penup */

    SETDOT = 0;			/* HP-GL only for linetype = 0 */

    SYMBOL = 0;			/* HP-GL only */
    /*
     *	   Default line/pen sizes (in mm)
     */
    pen_size[0] = 0.1;
    pen_size[1] = 0.2;
    pen_size[2] = 0.3;
    pen_size[3] = 0.4;
    pen_size[4] = 0.5;
    pen_size[5] = 0.7;
    pen_size[6] = 1.0;
    pen_size[7] = 1.25;
    pen_size[8] = 1.5;

    strcpy("Helvetica",font);		/* Default font */

    EOL = '\003';		/* End of line terminator default */

    /*
     * Default character specifications
     */
    char_angle = 0;		/* Degrees */
    char_slant = 0;		/* tan(angle) */
    char_height = 2.7;		/* mm */
    char_space = 0.8;		/* mm */
    char_width = 1.9;		/* mm */
    /*
     * Page offsets set to zero
     */
    xoffset = yoffset = 0;
    /*
     * Define degree to radian parameter
     */
    deg_rad = asin(1.0) / 90.0;
}