home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l291 / 6.ddi / RGGRAPH.FO$ / RGGRAPH.bin
Encoding:
Text File  |  1990-10-23  |  1.6 KB  |  51 lines

  1. CC  THREEGRAPHS - This subroutine displays three graphs for REALG.
  2. $NOTRUNCATE
  3. $NOTSTRICT
  4.  
  5.       INCLUDE  'FGRAPH.FI'
  6.  
  7.       SUBROUTINE threegraphs()
  8.  
  9.       INCLUDE  'FGRAPH.FD'
  10.  
  11.       INTEGER*2            dummy, halfx, halfy
  12.       INTEGER*2            xwidth, yheight, cols, rows
  13.       RECORD /videoconfig/ screen
  14.       COMMON               screen
  15.  
  16.       CALL clearscreen( $GCLEARSCREEN )
  17.       xwidth  = screen.numxpixels
  18.       yheight = screen.numypixels
  19.       cols    = screen.numtextcols
  20.       rows    = screen.numtextrows
  21.       halfx   = xwidth / 2
  22.       halfy   = (yheight / rows) * (rows / 2)
  23. C
  24. C     First window
  25. C
  26.       CALL setviewport( 0, 0, halfx - 1, halfy - 1 )
  27.       CALL settextwindow( 1, 1, rows / 2, cols / 2 )
  28.       dummy = setwindow( .FALSE., -2.0, -2.0, 2.0, 2.0 )
  29.       CALL gridshape( INT2( rows / 2 ) )
  30.       dummy = rectangle( $GBORDER, 0, 0, halfx - 1, halfy - 1 )
  31. C
  32. C     Second window
  33. C
  34.       CALL setviewport( halfx, 0, xwidth - 1, halfy - 1 )
  35.       CALL settextwindow( 1, (cols / 2) + 1, rows / 2, cols )
  36.       dummy = setwindow( .FALSE., -3.0, -3.0, 3.0, 3.0 )
  37.       CALL gridshape( INT2( rows / 2 ) )
  38.       dummy = rectangle_w( $GBORDER, -3.0, -3.0, 3.0, 3.0 )
  39. C  
  40. C     Third window
  41. C
  42.       CALL setviewport( 0, halfy, xwidth - 1, yheight - 1 )
  43.       CALL settextwindow( (rows / 2 ) + 1, 1, rows, cols )
  44.       dummy = setwindow( .TRUE., -3.0, -1.5, 1.5, 1.5 )
  45.       CALL gridshape( INT2( (rows / 2) + MOD( rows, 2 ) ) )
  46.       dummy = rectangle_w( $GBORDER, -3.0, -1.5, 1.5, 1.5 )
  47.    
  48.       READ (*,*)         ! Wait for ENTER key to be pressed
  49.       dummy = setvideomode( $DEFAULTMODE )
  50.       END
  51.