home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
exfor.arj
/
TEMP
/
10-17.FOR
< prev
next >
Wrap
Text File
|
1995-01-20
|
1KB
|
52 lines
$INCLUDE: 'C:\FG\FASTGRAF.FI'
PROGRAM MAIN
INTEGER*1 SOURCE(2560), DEST(3700)
C Initialize the video environment
CALL FG_INITPM
CALL FG_SETMODE(19)
C Draw a blue rectangle with a thick white border
CALL FG_SETCOLOR(9)
CALL FG_RECT(0,63,0,39)
CALL FG_SETCOLOR(15)
CALL FG_BOXDEPTH(5,5)
CALL FG_BOX(0,63,0,39)
CALL FG_MOVE(32,20)
CALL FG_JUSTIFY(0,0)
CALL FG_PRINT('SCALE',5)
C Retrieve the rectangle as a mode-specific bitmap
CALL FG_MOVE(0,39)
CALL FG_GETIMAGE(SOURCE,64,40)
CALL FG_WAITKEY
C Expand the bitmap by 10 pixels in each direction and
C then display it in the lower left corner of the screen
CALL FG_MOVE(0,199)
CALL FG_SCALE(SOURCE,DEST,64,40,74,50)
CALL FG_PUTIMAGE(DEST,74,50)
CALL FG_WAITKEY
C Reduce the original bitmap by 50% in each direction and
C then display it in the lower right corner of the screen
CALL FG_MOVE(288,199)
CALL FG_SCALE(SOURCE,DEST,64,40,32,20)
CALL FG_PUTIMAGE(DEST,32,20)
CALL FG_WAITKEY
C Restore 80x25 text mode and exit
CALL FG_SETMODE(3)
CALL FG_RESET
STOP ' '
END