1ARSCAM(3NCARG) NCAR GRAPHICS ARSCAM(3NCARG)
2
3
4
6 ARSCAM - Scans an area map from left to right, extracting the
7 definitions of all the areas defined by the area map and delivering
8 them to a user-defined subroutine for processing.
9
11 CALL ARSCAM (MAP,XCS,YCS,MCS,IAI,IAG,MAI,APR)
12
14 #include <ncarg/ncargC.h>
15
16 void c_arscam (int *map, float *xcs, float *ycs, int mcs, int *iai, int
17 *iag, int mai, int (*apr)(float *xcs, float *ycs, int *ncs, int *iai,
18 int *iag, int *nai))
19
21 MAP (an input/output array of type INTEGER) - An array
22 containing an area map that has been initialized by a call
23 to ARINAM and to which edges have been added by calls to
24 AREDAM. If you did not preprocess the area map by calling
25 ARPRAM, ARSCAM calls it before doing anything else.
26
27 Note: As part of initializing the area map, ARINAM stores
28 the dimension of MAP in MAP(1); therefore, the dimension
29 does not have to be given as an argument in calls to
30 ARSCAM.)
31
32 XCS,YCS (workspace arrays, dimensioned MCS, of type REAL) - Hold
33 the X and Y coordinates defining the edge of a given area,
34 for use by ARSCAM in calls to the area-processing routine
35 APR.
36
37 MCS (an input expression of type INTEGER) - Dimension of each
38 of the arrays XCS and YCS.
39
40 IAI,IAG (workspace arrays, dimensioned MAI, of type INTEGER) - Hold
41 MAI pairs of area identifiers and group identifiers,
42 respectively. Used by ARSCAM in calls to the area-
43 processing routine APR.
44
45 MAI (an input expression of type INTEGER) - Dimension of each
46 of the arrays IAI and IAG. MAI must be greater than or
47 equal to n, where n is the number of groups in the area
48 map.
49
50 APR (a subroutine) - An area-processing routine that is called
51 by ARSCAM, and must be declared EXTERNAL in the routine
52 that calls ARSCAM. You must supply the routine APR, and it
53 must have the following form:
54
55 SUBROUTINE APR (XCS,YCS,NCS,IAI,IAG,NAI)
56 DIMENSION XCS(*),YCS(*),IAI(*),IAG(*)
57
58 (code to process the area defined by XCS, YCS, IAI, and
59 IAG)
60
61 RETURN
62 END
63
64
65 XCS,YCS (input arrays, dimensioned NCS, of type REAL) -
66 The X and Y coordinates, in NDCs, of NCS points
67 defining a polygonal area. The last of these
68 points is a duplicate of the first. Holes in an
69 area are traced in a way that maximizes the
70 probability of hardware fill working properly.
71
72 NCS (an input expression of type INTEGER) - Number
73 of X and Y coordinates in the arrays XCS and
74 YCS.
75
76 IAI,IAG (input arrays, dimensioned NAI, of type
77 INTEGER) - Hold NAI pairs of identifiers for
78 the area defined by XCS and YCS. For each value
79 of I from 1 to NAI, IAI(I) is the area
80 identifier for the area with respect to the
81 group of edges specified by the group
82 identifier IAG(I).
83
84 NAI (an input expression of type INTEGER) - Number
85 of values returned in IAI and IAG. NAI equals
86 the number of groups of edges that you put in
87 the area map.
88
89 Before executing the first call to APR, ARSCAM calls GETSET to retrieve
90 the current user coordinates and then executes the statement:
91
92 CALL SET (VPL,VPR,VPB,VPT,VPL,VPR,VPB,VPT,1)
93
94 where VPL, VPR, VPB, and VPT are the viewport left, right, bottom, and
95 top coordinates in NDCs.
96
97 This ensures correct results if the NDCs in XCS and YCS are used in
98 calls to such routines as GFA and GPL, and it allows clipping at the
99 edges of the viewport. APR may make its own SET call to achieve some
100 other effect. Before returning control to the calling routine, ARSCAM
101 calls SET again to restore the original mapping parameters.
102
104 The C-binding argument descriptions are the same as the FORTRAN
105 argument descriptions.
106
108 Use the ncargex command to see the following relevant examples: cardb1,
109 carfill, ccpcldm, ccpfil, ccplbam, ccpllb, ccplll, ccpllw, ccpscam,
110 ccpvs, colcon, cmpfil, cmpgrp, cmpita, cmptit, cpex01, cpex02, cpex03,
111 cpex04, cpex05, cpex07, cpex08, eezmpa, arex01, vvex01, tareas, tconpa,
112 tezmpa, fcover, ffex00, fcirc, fsfsgfa, fsppoint.
113
115 To use ARSCAM or c_arscam, load the NCAR Graphics libraries ncarg,
116 ncarg_gks, and ncarg_c, preferably in that order.
117
119 See the areas man page for a description of all Areas error messages
120 and/or informational messages.
121
123 Online: areas, areas_params, ardbpa, ardrln, aredam, argeti, argetr,
124 argtai, arinam, armvam, arpram, arseti, arsetr, ncarg_cbind
125
126 Hardcopy: NCAR Graphics Contouring and Mapping Tutorial
127
129 Copyright (C) 1987-2009
130 University Corporation for Atmospheric Research
131 The use of this Software is governed by a License Agreement.
132
133
134
135UNIX March 1993 ARSCAM(3NCARG)