C
C SUBROUTINE 'QGSYMB'
C ===================
C
C PLOT CENTRED SYMBOL ON GRAPHICS SCREEN (QGINIT MUST HAVE BEEN CALLED)
C
      SUBROUTINE QGSYMB(X,Y,ITYP,HS)
C
C PARAMETERS
C
C     X (I)   X POSITION IN PIXELS 0.0 TO 1023.0 (OR MAPPED COORDINATE IF
C                        'QGMAPC' HAS BEEN CALLED)
C     Y (I)   Y POSITION IN PIXELS 0.0 TO 767.0(OR MAPPED COORDINATE IF
C                        'QGMAPC' HAS BEEN CALLED)
C  ITYP (I)   SYMBOL TYPE 0 = POINT
C                         1 = VERTICAL CROSS
C                         2 = DIAGONAL CROSS
C                         3 = SQUARE
C                         4 = DIAMOND
C                         5 = LARGE (2*HS) 'VERTICAL' HEXAGON
C    HS (I)   MAX X,Y OFFSET, IN PIXELS,  USED TO DRAW THE SYMBOL
C             (IF ITYP = 0 THEN A SINGLE PIXEL WILL BE DRAWN ON THE
C              TEK SCREEN: HS WILL BE USED AS THE RADIUS (IN MM) OF
C              THE POINT TO DE DRAWN FOR POSTSCRIPT O/P)
C
C
C SPECIFICATION STATEMENTS
C ------------------------
C
      LOGICAL MAPSAV, PSSAV
      LOGICAL MAP
      COMMON /QQMAP/ MAP, XPMIN, XPMAX, YPMIN, YPMAX, 
     *               XMMIN, XMMAX, YMMIN, YMMAX, XSC, YSC
      LOGICAL PSCRIP, PSON
      COMMON /QQPS/ PSCRIP, PSON, LUNP
      SAVE /QQMAP/,/QQPS/
C
C CODE
C ----
C
      IF (ITYP.EQ.0) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (X,Y)
         CALL QGDRAW (X,Y)
         PSON = PSSAV
         IF (PSCRIP.AND.PSON) THEN
            CALL QGMPXY (X,Y,XP,YP)
            WRITE (LUNP,1000) XP,YP,HS
         ENDIF
         RETURN
      ENDIF
      CALL QGMPXY(X,Y,XP,YP)
      MAPSAV = MAP
      MAP = .FALSE.
      IF (ITYP.EQ.1) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (XP-HS,YP)
         CALL QGDRAW (XP+HS,YP)
         CALL QGMOVE (XP,YP-HS)
         CALL QGDRAW (XP,YP+HS)
         PSON = PSSAV
         IF (PSCRIP.AND.PSON) WRITE (LUNP,1001) XP,YP,HS
      ELSE IF (ITYP.EQ.2) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (XP-HS,YP-HS)
         CALL QGDRAW (XP+HS,YP+HS)
         CALL QGMOVE (XP+HS,YP-HS)
         CALL QGDRAW (XP-HS,YP+HS)
         PSON = PSSAV
         IF (PSCRIP.AND.PSON) WRITE (LUNP,1002) XP,YP,HS
      ELSE IF (ITYP.EQ.3) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (XP-HS,YP-HS)
         CALL QGDRAW (XP-HS,YP+HS)
         CALL QGDRAW (XP+HS,YP+HS)
         CALL QGDRAW (XP+HS,YP-HS)
         CALL QGDRAW (XP-HS,YP-HS)
         PSON = PSSAV
         IF (PSCRIP.AND.PSON) WRITE (LUNP,1003) XP,YP,HS
      ELSE IF (ITYP.EQ.4) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (XP,YP-HS)
         CALL QGDRAW (XP-HS,YP)
         CALL QGDRAW (XP,YP+HS)
         CALL QGDRAW (XP+HS,YP)
         CALL QGDRAW (XP,YP-HS)
         PSON = PSSAV
         IF (PSCRIP.AND.PSON) WRITE (LUNP,1004) XP,YP,HS
      ELSE IF (ITYP.EQ.5) THEN
         PSSAV = PSON
         PSON = .FALSE.
         CALL QGMOVE (XP-2*HS,YP-HS)
         CALL QGDRAW (XP-2*HS,YP+HS)
         CALL QGDRAW (XP-HS,YP+2*HS)
         CALL QGDRAW (XP+HS,YP+2*HS)
         CALL QGDRAW (XP+2*HS,YP+HS)
         CALL QGDRAW (XP+2*HS,YP-HS)
         CALL QGDRAW (XP+HS,YP-2*HS)
         CALL QGDRAW (XP-HS,YP-2*HS)
         CALL QGDRAW (XP-2*HS,YP-HS)
         PSON = PSSAV
         HS=HS/2
         IF (PSCRIP.AND.PSON) WRITE (LUNP,1000) XP,YP,HS
      ENDIF
      MAP = MAPSAV
      RETURN
C
C FORMAT STATEMENTS
C -----------------
C
1000  FORMAT(2F7.1,F7.3,' P')
1001  FORMAT(3F7.1,' S1')
1002  FORMAT(3F7.1,' S2')
1003  FORMAT(3F7.1,' S3')
1004  FORMAT(3F7.1,' S4')
      END
