1 *C------------------------------------------------------------------------
2 subroutine pg_init2() ! same as pginit, but no paw initializ.
3 C and no higz initializ.
6 C------------------------------------------------------------------------
8 include 'petgracom.for'
17 *C------------------------------------------------------------------------
18 subroutine pg_init1() ! same as pginit, but no paw initializ.
22 C------------------------------------------------------------------------
24 include 'petgracom.for'
34 *C------------------------------------------------------------------------
35 subroutine pg_init(chopt)
39 C------------------------------------------------------------------------
41 include 'petgracom.for'
53 C------------------------------------------------------------------------
58 C------------------------------------------------------------------------
60 include 'petgracom.for'
64 call iopwk (wkid,conid,wtype)
67 !mettere qui le inizializzazioni !
71 C------------------------------------------------------------------------
76 C------------------------------------------------------------------------
78 include 'petgracom.for'
88 C------------------------------------------------------------------------
89 subroutine pg_fullscreen()
91 C pg_fullscreen .......
93 C------------------------------------------------------------------------
95 include 'petgracom.for'
97 real*4 display_x,display_y
100 call gqdsp(wtype,idummy,idummy,display_x,display_y,idummy,idummy)
101 max_coord = amax1 (display_x,display_y)
102 if ((display_x/max_coord) .eq. 1) then
104 scale_y=display_y/max_coord
106 scale_x=display_x/max_coord
109 c call gswkwn(wkid,0.0,scale_x,0.0,scale_y)
110 call iswkwn(wkid,0.0,scale_x,0.0,scale_y)
111 call iswkvp(wkid,0.0,display_x,0.0,display_y)
114 C------------------------------------------------------------------------
115 subroutine pg_setscreen(x0,y0,fact)
117 C pg_setscreen .......
119 C------------------------------------------------------------------------
121 include 'petgracom.for'
123 real*4 display_x,display_y
125 real*4 x0,y0 ! screen coordinates of the origin
126 real*4 x,y ! screen coordinates of the origin
127 real*4 fact ! reduction factor of the screen
129 if (fact.lt.0) return
130 call gqdsp(wtype,idummy,idummy,display_x,display_y,idummy,idummy)
131 max_coord = amax1 (display_x,display_y)
132 if ((display_x/max_coord) .eq. 1) then
134 scale_y=display_y/max_coord
136 scale_x=display_x/max_coord
143 if (x+fact*display_x.gt.display_x) x=0
144 if (y+fact*display_y.gt.display_y) y=0
145 c call gswkwn(wkid,0.0,scale_x,0.0,scale_y)
146 call iswkwn(wkid,0.0,scale_x,0.0,scale_y)
147 call iswkvp(wkid,x,x+fact*display_x,y,y+fact*display_y)
150 C------------------------------------------------------------------------
151 subroutine pg_frames()
155 C------------------------------------------------------------------------
157 include 'petgracom.for'
161 call iswn(tnfull,0.,1.,0.,1.)
162 call isvp(tnfull,0.,1.*scale_x,0.,1.*scale_y)
164 call Igbox (0.0,1.0,0.0,1.0)
165 call Igline(0.0,1.0,0.5,0.5)
166 call Igline(0.5,0.5,0.0,1.0)
167 call guwk (wkid,GSUPPD)
170 C------------------------------------------------------------------------
171 subroutine pg_initframe1(tn,xmax,ymax,cent,iso)
173 C pg_initframe .......
175 C------------------------------------------------------------------------
177 include 'petgracom.for'
180 integer*4 tn,cent,iso
183 ratio_vp=scale_x/scale_y
188 if (ratio_vp.ge.1) then
189 if ( ratio_ob.le.1) then
192 else if (ratio_vp.gt.ratio_ob) then
201 if (ratio_vp.lt.1) then
202 if ( ratio_ob.gt.1) then
205 else if (ratio_vp.gt.ratio_ob) then
218 if (tn.eq.tnvptl) then
224 else if (tn.eq.tnvptr) then
229 else if (tn.eq.tnvpbl) then
244 call gswn(tn,-x,x,-y,y)
245 call iswn(tn,-x,x,-y,y)
247 call gswn(tn,0.,x,0.,y)
248 call iswn(tn,0.,x,0.,y)
251 call gsvp(tn,vpx1,vpx2,vpy1,vpy2)! the window and viewport data
252 call isvp(tn,vpx1,vpx2,vpy1,vpy2)! and I won't be able to retrieve
253 return ! them by the GQNT
255 C------------------------------------------------------------------------
256 subroutine pg_axis(tn)
260 C------------------------------------------------------------------------
262 include 'petgracom.for'
271 call gqnt(tn,ierr,frame,dummy)
273 tmsi=(frame(2)-frame(1))/100.
274 call Igset('TMSI',tmsi)
275 call Igaxis (frame(1),frame(2),0.,0.,frame(1),frame(2),5,'S+-')
276 tmsi=(frame(4)-frame(3))/100.
277 call Igset('TMSI',tmsi)
278 call Igaxis (0.,0.,frame(3),frame(4),frame(3),frame(4),5,'S+-')
279 call guwk (wkid,GSUPPD)
283 C------------------------------------------------------------------------
284 subroutine pg_graph(tn,n,x,y)
288 C------------------------------------------------------------------------
290 include 'petgracom.for'
296 call Igraph(n,x,y,'LA')
297 call guwk (wkid,GSUPPD)
301 C------------------------------------------------------------------------
302 subroutine pg_hist(tn,n,x,y)
306 C------------------------------------------------------------------------
308 include 'petgracom.for'
314 call Ighist(n,x,y,'AB')
315 call guwk (wkid,GSUPPD)
319 C------------------------------------------------------------------------
320 subroutine pg_circle(tn,xc,yc,r)
324 C------------------------------------------------------------------------
326 include 'petgracom.for'
332 call Igarc(xc,yc,r,r,0,0)
333 call guwk (wkid,GSUPPD)
336 C------------------------------------------------------------------------
337 subroutine pg_box(tn,x1,x2,y1,y2)
341 C------------------------------------------------------------------------
343 include 'petgracom.for'
350 call Igbox(x1,x2,y1,y2)
351 call guwk (wkid,GSUPPD)
355 C------------------------------------------------------------------------
356 subroutine pg_trackxyzr(p1,p2,party)
360 C------------------------------------------------------------------------
362 include 'petgracom.for'
365 real*4 p1(3),p2(3),a(2),b(2)
382 r1=sqrt( p1(x)*p1(x) + p1(y)*p1(y))
383 r2=sqrt( p2(x)*p2(x) + p2(y)*p2(y))
399 call guwk (wkid,GSUPPD)
402 C------------------------------------------------------------------------
403 subroutine pg_crimage(name)
407 C------------------------------------------------------------------------
410 include 'petgracom.for'
414 call Izpict(name,'M')
417 C------------------------------------------------------------------------
418 subroutine pg_rdimage(name)
422 C------------------------------------------------------------------------
425 include 'petgracom.for'
429 call Izpict(name,'D')
432 C------------------------------------------------------------------------
433 subroutine pg_deimage(name)
437 C------------------------------------------------------------------------
440 include 'petgracom.for'
444 call Izpict(name,'S')
448 C------------------------------------------------------------------------
449 subroutine pg_initframe(tn,xmini,xmaxi,ymini,ymaxi,iso,cent)
451 C pg_initframe .......
453 C------------------------------------------------------------------------
455 include 'petgracom.for'
458 integer*4 tn,cent,iso
465 if (xmax.eq.0) xmax=1
466 if (ymax.eq.0) ymax=1
467 ratio_vp=scale_x/scale_y
472 if (ratio_vp.ge.1) then
473 if ( ratio_ob.le.1) then
476 else if (ratio_vp.gt.ratio_ob) then
485 if (ratio_vp.lt.1) then
486 if ( ratio_ob.gt.1) then
489 else if (ratio_vp.gt.ratio_ob) then
502 if (tn.eq.tnvptl) then
508 else if (tn.eq.tnvptr) then
513 else if (tn.eq.tnvpbl) then
530 call gswn(tn,-x,x,-y,y)
531 call iswn(tn,-x,x,-y,y)
535 call gswn(tn,xmini, x, ymini, y)
536 call iswn(tn,xmini, x, ymini, y)
538 call gsvp(tn,vpx1,vpx2,vpy1,vpy2)! the window and viewport data
539 call isvp(tn,vpx1,vpx2,vpy1,vpy2)! and I won't be able to retrieve
540 return ! them by the GQNT