summaryrefslogtreecommitdiff
path: root/graphics/hpgl2ps/plotcoords.c
blob: f985222cef40283ee703779226ee1d5cf2074ce5 (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
/*
 *	Define default maximum and minimum plotting coordinates.
 *		P1 (xmin, ymin),  P2 (xmax, ymax)
 *
 *	PaperSize can be:
 *			"A3" ISO (420mm by 297mm)
 *			"A4" ISO (297mm by 210mm)
 *			"A"  ANSI (11" by 8.5")
 *			"B"  ANSI (17" by 11")
 *
 *	Mode can be:	"HPGL" or "DXY"
 *
 * Don McCormick
 */

#include "defn.h"

plotcoords()
{
    if (strcmp(Mode, "HPGL") == 0)
    {
	if (strcmp(PaperSize, "A3") == 0)	/* HP-GL ISO A3 420mm * 297mm */
	{
	    xmax = 15200;
	    ymax = 10800;
	}
	else					/* HP-GL ISO A4 297mm * 210mm */
	{
	    xmax = 10800;
	    ymax = 7680;
	}
    }
    else
    {
	if (strcmp(PaperSize, "A3") == 0)	/* DXY ISO A3 420mm * 297mm */
	{
	    xmax = 3800;
	    ymax = 2700;
	}
	else				/* DXY ISO A4 297mm * 210mm */
	{
	    xmax = 2700;
	    ymax = 1920;
	}
    }
    xmin = ymin = 0.0;
}