diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/hpgl2ps/plotinit.c |
Initial commit
Diffstat (limited to 'graphics/hpgl2ps/plotinit.c')
-rw-r--r-- | graphics/hpgl2ps/plotinit.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/graphics/hpgl2ps/plotinit.c b/graphics/hpgl2ps/plotinit.c new file mode 100644 index 0000000000..326ffb648a --- /dev/null +++ b/graphics/hpgl2ps/plotinit.c @@ -0,0 +1,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; +} |