home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exfor.arj / TEMP / 10-18.FOR < prev    next >
Text File  |  1995-01-20  |  993b  |  44 lines

  1. $INCLUDE: 'C:\FG\FASTGRAF.FI'
  2.  
  3.       PROGRAM MAIN
  4.  
  5.       INTEGER*1 SOURCE(2560), DEST(3200)
  6.  
  7. C  Initialize the video environment
  8.  
  9.       CALL FG_INITPM
  10.       CALL FG_SETMODE(19)
  11.  
  12. C  Draw a blue rectangle with a thick white border
  13.  
  14.       CALL FG_SETCOLOR(9)
  15.       CALL FG_RECT(0,63,0,39)
  16.       CALL FG_SETCOLOR(15)
  17.       CALL FG_BOXDEPTH(5,5)
  18.       CALL FG_BOX(0,63,0,39)
  19.       CALL FG_MOVE(32,20)
  20.       CALL FG_JUSTIFY(0,0)
  21.       CALL FG_PRINT('SHEAR',5)
  22.  
  23. C  Retrieve the rectangle as a mode-specific bitmap
  24.  
  25.       CALL FG_MOVE(0,39)
  26.       CALL FG_GETIMAGE(SOURCE,64,40)
  27.       CALL FG_WAITKEY
  28.  
  29. C  Shear the bitmap horizontally and to the right 16 pixels
  30. C  then display it in the lower left corner of the screen
  31.  
  32.       CALL FG_MOVE(0,199)
  33.       CALL FG_SHEAR(SOURCE,DEST,64,40,80,1)
  34.       CALL FG_PUTIMAGE(DEST,80,40)
  35.       CALL FG_WAITKEY
  36.  
  37. C  Restore 80x25 text mode and exit
  38.  
  39.       CALL FG_SETMODE(3)
  40.       CALL FG_RESET
  41.  
  42.       STOP ' '
  43.       END
  44.