blob: 36a90186c30ffdb7202008f76e7bd26c80c54259 (
plain) (
blame)
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
58
59
60
61
62
63
64
65
|
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
include <gset.h>
include "gks.h"
# GQTXAL -- Inquire text alignment.
procedure gqtxal (ierror, txalh, txalv)
int ierror # Error indicator; ierror = 0 means no error
int txalh # Horizontal text alignment
int txalv # Vertical text alignment
int justify
int gstati()
include "gks.com"
begin
if (gk_std == NULL) {
# GKS not in proper state; no active workstations
ierror = 7
txalh = -1
txalv = -1
return
} else
ierror = 0
iferr {
# Get value of horizontal text justification
justify = gstati (gp[gk_std], G_TXHJUSTIFY)
switch (justify) {
case GT_NORMAL:
txalh = GAHNOR
case GT_CENTER:
txalh = GACENT
case GT_LEFT:
txalh = GALEFT
case GT_RIGHT:
txalh = GARITE
default:
txalh = GAHNOR
}
# Get value of vertical text justification
justify = gstati (gp[gk_std], G_TXVJUSTIFY)
switch (justify) {
case GT_NORMAL:
txalv = GAVNOR
case GT_CENTER:
txalv = GAHALF
case GT_TOP:
txalv = GATOP
case GT_BOTTOM:
txalv = GABOTT
default:
txalv = GAVNOR
}
} then {
ierror = 1
txalv = -1
txalh = -1
}
end
|