Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 14 NOV 1989 | 2.X | EXPERT | VIDEO.RW, |
VIDEO.RW reads, writes, or clears the specified display area.
An integer indicating the starting column of the display area
An integer indicating the top row of the display area.
An integer indicating the ending column of the display area
An integer indicating the bottom row of the display area
One of the following operators specifying the function VIDEO.RW is to perform:
Operator | Function |
---|---|
R | Save (read) the specified area of the display |
W | Restore (write) the specified area of the display |
C | Clear the specified area of the display |
A variable whose value is determined by the operator specified:
Operator | Value |
---|---|
R | A variable used by VIDEO.RW to save the display image described by the coordinates specified in the argument list. Multiple full-screen save operations should be avoided to conserve memory. Each screen saved requires approximately 4K. |
W | The display image saved in the preceding read operation. The display image is written to the coordinates specified in the argument list. |
C | A two-byte sequence specifying the background character and foreground<$Ivideo attribute> video attribute. The background character defaults to space, and the foreground attribute to Normal. For a standard monochrome display, image may be null (see Appendix 3, Video Attributes). |
If a read or write operation is specified, VIDEO.RW passes the display image in the image parameter of the argument list.
*Initialization for each example DECLARE SUBROUTINE VIDEO.RW,MSG *Save full screen image, clear using default attributes, display *message, and restore VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH- 1,'R',IMAGE) VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH-1,'C','') MSG('Saved the status line as well','','','') VIDEO.RW(0,0,@CRTWIDE-1,@CRTMAXHIGH-1,'W',IMAGE) *Save half screen image, clear, display message, and restore VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C','') MSG('Cleared fully half','','','') VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE) *Save partial screen image, clear, display message, and restore VIDEO.RW(20,10,60,20,'R',IMAGE) VIDEO.RW(20,10,60,20,'C','') MAP = '' TYPE = 1 COL = 3 ROW = 4 MAP<TYPE> = 'A' MAP<COL> = 24 MAP<ROW> = 16 MSG('Window',MAP,'','') VIDEO.RW(20,10,60,20,'W',IMAGE) *For color displays only: Save partial screen image, clear color *display and set background attributes, display message, and *restore (see Appendix 3, Video Attributes). BACK.CHAR = '*' ;* background fill character BACKGROUND = 5 ;* background video attribute FOREGROUND = 14 ;* foreground video attribute COLOR = (BACKGROUND * 16) + FOREGROUND ;* color formula COLOR = CHAR(COLOR) ATTRIBUTES = BACK.CHAR:COLOR<E> VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C',ATTRIBUTES) MSG('Clear half with a background color change','','','') VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE) *For color displays only: the same example as above, but using *the current video settings in the system variable @ENVIRON.SET. $INSERT UTILITY.PROGS,ENVIRON.CONSTANTS *Background fill character BACK.CHAR = @ENVIRON.SET<E.BACK.CHAR> *Background video attribute BACKGROUND = @ENVIRON.SET<E.BG.BACK.CHAR>[4,1] *Foreground video attribute FOREGROUND = @ENVIRON.SET<E.BG.FORE.COLOR>[4,1] COLOR = (BACKGROUND * 16) + FOREGROUND ;* color formula COLOR = CHAR(COLOR) ATTRIBUTES = BACK.CHAR:COLOR<E> VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'R',IMAGE) VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'C',ATTRIBUTES) MSG('Clear half with a background color change','','','') VIDEO.RW(0,10,@CRTWIDE-1,@CRTHIGH-1,'W',IMAGE)