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

  1. #include <fastgraf.h>
  2.  
  3. void main(void);
  4.  
  5. char source[64*40], dest[80*40];
  6.  
  7. void main()
  8. {
  9.    /* initialize the video environment */
  10.  
  11.    fg_initpm();
  12.    fg_setmode(19);
  13.  
  14.    /* draw a blue rectangle with a thick white border */
  15.  
  16.    fg_setcolor(9);
  17.    fg_rect(0,63,0,39);
  18.    fg_setcolor(15);
  19.    fg_boxdepth(5,5);
  20.    fg_box(0,63,0,39);
  21.    fg_move(32,20);
  22.    fg_justify(0,0);
  23.    fg_print("SHEAR",5);
  24.  
  25.    /* retrieve the rectangle as a mode-specific bitmap */
  26.  
  27.    fg_move(0,39);
  28.    fg_getimage(source,64,40);
  29.    fg_waitkey();
  30.  
  31.    /* shear the bitmap horizontally and to the right 16 pixels */
  32.    /* then display it in the lower left corner of the screen   */
  33.  
  34.    fg_move(0,199);
  35.    fg_shear(source,dest,64,40,80,1);
  36.    fg_putimage(dest,80,40);
  37.    fg_waitkey();
  38.  
  39.    /* restore 80x25 text mode and exit */
  40.  
  41.    fg_setmode(3);
  42.    fg_reset();
  43. }
  44.