Problem with AGCHCU.

From: Dave Kennison (kennison@XXXXXX)
Date: Mon Oct 27 1997 - 15:39:17 MST


Mike,

Put a "CALL SFLUSH" prior to each call to GSPLCI. This flushes out some
pen-move buffers in SPPS, so that the color change requested by the call
to GSPLCI will be done *after* drawing the line segments represented by
the pen moves in the buffer (the bottom and top axes) rather than before.

A slightly simplified version of your test program is attached. It has
the calls to SFLUSH in it; comment them out to see the original problem.

Dave Kennison

Simplified Test Program:
---------- ---- --------

      PROGRAM TESTIT
        LOGICAL COLOURCURVES
        INTEGER NCURVCOL,ICURVCOL(7)
        COMMON /CCCAGCHCU/ COLOURCURVES,NCURVCOL,ICURVCOL
        DIMENSION XDRA(101),YDRA(101,5)
        DATA COLOURCURVES / .TRUE. /
        DATA NCURVCOL / 7 /
        DATA ICURVCOL / 100,101,102,103,104,105,106 /
        CALL OPNGKS
        CALL GSCR (1,0,1.,1.,1.)
        CALL GSCR (1,1,0.,0.,0.)
        CALL GSCR (1,2,1.,0.,0.)
        CALL GSCR (1,3,0.,1.,0.)
        CALL GSCR (1,4,0.,0.,1.)
        CALL GSCR (1,5,0.,1.,1.)
        CALL GSCR (1,6,1.,0.,1.)
        CALL GSCR (1,7,1.,1.,0.)
        CALL GSCR (1,8,1.,1.,1.)
        DO 101 I=1,101
          XDRA(I)=REAL(I-1)/100.
          YDRA(I,1)=XDRA(I)
          YDRA(I,2)=XDRA(I)**2
          YDRA(I,3)=XDRA(I)**3
          YDRA(I,4)=XDRA(I)**4
          YDRA(I,5)=XDRA(I)**5
  101 CONTINUE
        CALL EZMXY (XDRA,YDRA,101,5,101,'TEST PLOT')
        CALL CLSGKS
        STOP
      END

      SUBROUTINE AGCHCU (IFLG,KDSH)
      IMPLICIT NONE

      INTEGER IFLG,KDSH

        LOGICAL COLOURCURVES
        INTEGER NCURVCOL,ICURVCOL(7)
        COMMON /CCCAGCHCU/ COLOURCURVES,NCURVCOL,ICURVCOL

        INTEGER NCURRCOL
        SAVE NCURRCOL
        DATA NCURRCOL / 0 /

        WRITE(*,*)'AGCHCU: ',COLOURCURVES,IFLG

        IF(COLOURCURVES) THEN
          IF(IFLG.EQ.0) THEN
            WRITE(*,*) 'colour'
            CALL SFLUSH
            CALL GSPLCI(ICURVCOL(MOD(NCURRCOL,NCURVCOL)+1)-98)
            NCURRCOL=NCURRCOL+1
          ELSE
            WRITE(*,*) 'black'
            CALL SFLUSH
            CALL GSPLCI(1)
          ENDIF
        ELSE
          WRITE(*,*) 'not colourcurves'
            CALL SFLUSH
          CALL GSPLCI(1)
        ENDIF

        RETURN

      END



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:39 MDT