1BUILDRDSWINDOW(3) RDS PHYSICAL FUNCTIONS BUILDRDSWINDOW(3)
2
3
4
6 buildrdswindow - builds windowing of a figure
7
9 #include "rwinnn.h"
10 rdswindow ∗buildrdswindow( Figure )
11 rdsfig_list ∗Figure;
12
14 Figure The figure where has to be built the windowing.
15
17 The buildrdswindow function permits to build windowing on the figure
18 named ´Figure´.
19
21 The pointer to the windowing structure "rdswindow".
22
24 "Rds202: rdsalloc error, can't continue !"
25 it's impossible to allocate the memory size desired
26
28 #include "mphnnn.h"
29 #include "mutnnn.h"
30 #include "rdsnnn.h"
31 #include "rfmnnn.h"
32 #include "rwinnn.h"
33 #include "rtlnnn.h"
34 main()
35 {
36 phfig_list ∗MbkFigure;
37 rdsfig_list ∗RdsFigure;
38 rdswindow ∗Window;
39 long X,Y,Offset;
40 rdswin_list ∗Win;
41 rdswinrec_list ∗WinRec;
42 rdsrec_list ∗ScanRec;
43 char Layer;
44 char Index;
45 mbkenv();
46 rdsenv();
47 loadrdsparam();
48 MbkFigure = getphfig("na2_y",'A');
49 RdsFigure = figmbkrds(MbkFigure,0,0);
50 Window = buildrdswindow ( RdsFigure );
51 /∗ gets each window of the table ∗/
52 for ( X = 0 ; X < Window->DX ; X ++ )
53 for ( Y = 0 ; Y < Window->DY ; Y ++ )
54 {
55 printf("WINDOW (%ld,%ld)\n",X,Y);
56 Offset = Y ∗ Window->DX + X;
57 Win = Window->WINTAB + Offset;
58 /∗ gets all rectangles of a window ∗/
59 for ( Layer = 0 ; Layer < RWI_MAX_LAYER ; Layer ++ )
60 {
61 printf("LAYER = %s\n",RDS_LAYER_NAME[Layer]);
62 for ( WinRec = Win->LAYERTAB[ Layer ];
63 WinRec != (rdswinrec_list ∗)NULL;
64 WinRec = WinRec->NEXT )
65 {
66 for (
67 Index = 0;
68 Index < RWI_MAX_REC;
69 Index++
70 )
71 {
72 ScanRec = WinRec->RECTAB[ Index ];
73 /∗ prints dimensions of each rectangle ∗/
74 if ( ScanRec != NULL )
75 printf("X=%ld, Y=%ld, DX=%ld, DY=%ld\n",
76 ScanRec->X,ScanRec->Y,ScanRec->DX,
77 ScanRec->DY);
78 else break;
79 }
80 }
81 }
82 }
83 . . .
84 }
85
87 librwi, allocrdswindow, destroyrdswindow, viewrdswindow
88
89
90
91
92
93
94ASIM/LIP6 October 1, 1997 BUILDRDSWINDOW(3)