Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tips:revmedia:r45 [2023/11/05 22:15] – created - external edit 127.0.0.1 | tips:revmedia:r45 [2024/06/19 20:20] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Changes to BORDER.UP for Advanced Revelation Version 2.0===== | ||
+ | ^Published By^Date^Version^Knowledge Level^Keywords^ | ||
+ | |Revelation Technologies|01 FEB 1990|2.X|INTERMEDIATE|BORDER.UP, | ||
+ | |||
+ | Advanced Revelation Version 2.0 provides the option of displaying shadows | ||
+ | below and to the right of windows, popups, and messages. BORDER.UP, the | ||
+ | system subroutine that draws borders onto the screen, has been modified to | ||
+ | automatically handle display of shadows. A flag has been added to the | ||
+ | parameters passed to BORDER.UP to turn this feature on and off. | ||
+ | |||
+ | ==== Displaying Shadows ==== | ||
+ | |||
+ | To display shadows using an R/BASIC program, there are two conditions. | ||
+ | First, the environment flag for displaying border shadows must be set to | ||
+ | true (field 76 in the current environment record). This flag can be set from | ||
+ | the Video Environment window or by changing the 76th field of @ENVIRON.SET. | ||
+ | |||
+ | Second, the call to BORDER.UP must have the sixth field of the border type | ||
+ | (fifth) argument set to logical true. Even if the call to BORDER.UP requests | ||
+ | shadows they will not display if the environment flag is turned off. For an | ||
+ | example of a BORDER.UP call that displays a shadow, see Figure 1. | ||
+ | |||
+ | Shadows will not display if the environment flag for border shadows is | ||
+ | turned off, regardless of the border type flag setting. | ||
+ | |||
+ | ==== Using VIDEO.RW with Shadows ==== | ||
+ | |||
+ | When implementing shadows, you must be sure to accommodate shadows in calls | ||
+ | to VIDEO.RW that save and restore the screen. To do so, add 2 to the top | ||
+ | right X coordinate, and 1 to the bottom left Y coordinate so that the space | ||
+ | occupied by shadows is included. A sample call to VIDEO.RW is illustrated in | ||
+ | Figure 2. | ||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | === Figure 1 === | ||
+ | |||
+ | < | ||
+ | * setting shadow flag | ||
+ | |||
+ | $INSERT INCLUDE, WINDOW.POINTERS | ||
+ | |||
+ | DECLARE SUBROUTINE BORDER.UP | ||
+ | |||
+ | EQU TRUE$ TO 1 | ||
+ | EQU SHADOWON$ TO 6 ; * 6th attribute of border type | ||
+ | |||
+ | ULX = 10 ; * upper left col | ||
+ | ULY = 5 ; * upper left row | ||
+ | BRX = 40 ; * bottom right col | ||
+ | BRY = 15 ; * bottom right row | ||
+ | BTYPE = @AW< | ||
+ | BTYPE< | ||
+ | ATTR = @AW< | ||
+ | |||
+ | BORDER.UP(ULX, | ||
+ | </ | ||
+ | |||
+ | === Figure 2 === | ||
+ | |||
+ | < | ||
+ | * including shadow offsets to VIDEO.RW call | ||
+ | |||
+ | $INSERT INCLUDE, WINDOW.POINTERS | ||
+ | DECLARE SUBROUTINE BORDER.UP, VIDEO.RW | ||
+ | |||
+ | EQU X_OFFSET$ TO 2 ; * offset for columns (add 2 columns) | ||
+ | EQU Y_OFFSET$ TO 1 ; * offset for rows (add 1 row) | ||
+ | EQU TRUE$ TO 1 | ||
+ | EQU SHADOWON$ TO 6 | ||
+ | |||
+ | IMAGE = '' | ||
+ | ULX = 10 ; * upper left col | ||
+ | ULY = 5 ; * upper left row | ||
+ | BRX = 40 ; * bottom right col | ||
+ | BRY = 15 ; * bottom right row | ||
+ | |||
+ | BTYPE = @AW< | ||
+ | BTYPE< | ||
+ | ATTR = @AW< | ||
+ | |||
+ | |||
+ | /* these lines read the current video image and post a border | ||
+ | (spacing in the lines is used for clarity) */ | ||
+ | |||
+ | VIDEO.RW( ULX, ULY, BRX X_OFFSET$, BRY Y_OFFSET$, ' | ||
+ | BORDER.UP( ULX, ULY, BRX, BRY, BTYPE, ATTR ) | ||
+ | * | ||
+ | * your code here | ||
+ | * | ||
+ | * restore video image when done | ||
+ | VIDEO.RW(ULX, | ||
+ | </ |