/
test239.c
76 lines (33 loc) · 1.59 KB
/
test239.c
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
66
67
68
69
70
71
72
73
74
75
76
#define INCL_GPICORRELATION /* GPI Correlation functions */
#include <os2.h>
int main(VOID)
{
BOOL fSuccess; /* success indicator */
SIZEL psizlSize; /* size of pick aperture */
LONG lNumHits; /* number of hits or error */
HPS hps; /* Presentation-space handle */
LONG lFirstSegment; /* Specifies the first segment to be
correlated */
LONG lLastSegment; /* Specifies the last segment to be
correlated */
POINTL pptlPick = {200L,200L};
/* Pick (center of aperture) position */
LONG lMaxHits; /* Maximum hits to be returned */
LONG lMaxDepth; /* Number of pairs to be returned */
LONG alSegTag; /* Segment identifiers and tags */
fSuccess = GpiSetPickAperturePosition(hps, &pptlPick);
/* set aperture size (use default) */
fSuccess = GpiSetPickApertureSize(hps, PICKAP_DEFAULT, &psizlSize);
/* define chain of two segments (1 and 2) */
lFirstSegment = 1;
lLastSegment = 2;
/* return only one hit */
lMaxHits = 1L;
/* return only one segment/tag pair per hit */
lMaxDepth = 1L;
/* correlate on visible, detectable segments */
lNumHits = GpiCorrelateFrom(hps, lFirstSegment, lLastSegment,
PICKSEL_VISIBLE, &pptlPick, lMaxHits,
lMaxDepth, &alSegTag);
return 0;
}