Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gviewf.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:20:30 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.28 by S.Giani
11*-- Author :
12 SUBROUTINE GVIEWF(U,V,NP)
13C.
14C. ******************************************************************
15C. * *
16C. * Draw the polyline described by U and V vectors, *
17C. * of length NP. *
18C. * *
19C. * Depending on IDVIEW it draws on screen (IDVIEW=0) *
20C. * or stores in the current view bank (IDVIEW>0). *
21C. * *
22C. * In LINATT (common GCDRAW) there is *
23C. * a bit mask for the line attributes : *
24C. * *
25C. * Bit 1- 7 = Used by view bank (LENGU) *
26C. * Bit 8-10 = Line width *
27C. * Bit 11-13 = Line style *
28C. * Bit 14-16 = Fill area *
29C. * Bit 17-24 = Line color *
30C. * *
31C. * ==>Called by : GDRAWV *
32C. * Author : P.Zanarini ; S.Giani ********* *
33C. * *
34C. ******************************************************************
35C.
36#include "geant321/gcbank.inc"
37#include "geant321/gcdraw.inc"
38#include "geant321/gcunit.inc"
39#include "geant321/gcflag.inc"
40#include "geant321/gcspee.inc"
41 DIMENSION U(*),V(*)
42 SAVE LFILOL
43 DATA LFILOL/-1/
44C.
45C. ------------------------------------------------------------------
46C.
47C
48C Store on view bank IDVIEW
49C
50 JV=LQ(JDRAW-IDVIEW)
51 IGU=IGU+1
52C
53 10 IF (IGU.LE.MAXGU) GO TO 20
54C
55C Push graphic unit banks
56C
57 IF(MORGU.EQ.0)MORGU=100
58 MORPUS=MAX(MORGU,MAXGU/4)
59 JV = LQ(JV-1)
60 CALL MZPUSH(IXCONS,JV,0,MORPUS,'I')
61 IF(IEOTRI.NE.0)GO TO 40
62 JV=LQ(JDRAW-IDVIEW)
63 JV = LQ(JV-2)
64 CALL MZPUSH(IXCONS,JV,0,MORPUS,'I')
65 IF(IEOTRI.NE.0)GO TO 40
66 JV=LQ(JDRAW-IDVIEW)
67 MAXGU=MAXGU+MORPUS
68 GO TO 10
69C
70 20 IF ((IGS+NP).LE.MAXGS) GO TO 30
71C
72C Push graphic segment banks
73C
74 IF(MORGS.EQ.0)MORGS=100
75 MORPUS=MAX(MORGS,MAXGS/4,NP)
76 JV = LQ(JV-4)
77 CALL MZPUSH(IXCONS,JV,0,MORPUS,'I')
78 IF(IEOTRI.NE.0)GO TO 40
79 JV=LQ(JDRAW-IDVIEW)
80 JV = LQ(JV-5)
81 CALL MZPUSH(IXCONS,JV,0,MORPUS,'I')
82 IF(IEOTRI.NE.0)GO TO 40
83 JV=LQ(JDRAW-IDVIEW)
84 MAXGS=MAXGS+MORPUS
85*
86 GO TO 20
87C
88 30 CONTINUE
89 Q(JV+13)=GTHETA
90 Q(JV+14)=GPHI
91 Q(JV+15)=GPSI
92 Q(JV+16)=GU0
93 Q(JV+17)=GV0
94 Q(JV+18)=GSCU
95 Q(JV+19)=GSCV
96 JV1=LQ(JV-1)
97 JV2=LQ(JV-2)
98 JV4=LQ(JV-4)
99 JV5=LQ(JV-5)
100*
101 CALL UCOPY(U,Q(JV4+IGS+1),NP)
102 CALL UCOPY(V,Q(JV5+IGS+1),NP)
103C
104C Bit 1- 7 = LENGU
105C Bit 8-24 = Line attribute
106C
107 ISUM=0
108 CALL MVBITS(LINATT,0,24,ISUM,0)
109 CALL MVBITS(NP,0,10,ISUM,0)
110 Q(JV1+IGU)=ISUM
111C
112 Q(JV2+IGU)=IGS+1
113 IGS=IGS+NP
114 GO TO 999
115C
116 40 WRITE (CHMAIL,10000)
117 CALL GMAIL(0,0)
118C
11910000 FORMAT (' *** GVIEWF ***: Memory overflow in pushing a bank')
120 999 END