Expand/Shrink

display_text_image

Platform: WINDOWS ONLY
Definition: display_text_image(sequence topleft, sequence image)
Description: Display the 2-d sequence of characters and attributes contained in image at the {line, colum} specified by topleft.
image is a sequence of lines, where each line is a (binary) string of characters and attributes to be displayed.
The top-left character is displayed at topleft. Other characters appear to the right or below this position.
The attributes indicate the foreground and background colours (0..15) of the preceding character, where the background colour is times 16/left-shifted 4 bits.
pwa/p2js: Not supported
Comments: image would normally be the result of a previous call to save_text_image(), though (as below) you could construct it yourself.

You might use save_text_image()/display_text_image() in a text-mode (console) application, to allow "pop-up" dialog boxes, and drop-down menus to appear and disappear without losing what was previously on the screen.

The sequences of the text image do not have to all be the same length.
Example:
clear_screen()
display_text_image({1,1}, {{'A', WHITE, 'B', GREEN},
                           {'C', RED+16*WHITE},
                           {'D', BLUE}})
-- displays:
     AB
     C
     D
-- at the top left corner of the screen.
-- 'A' will be white with black (0) background color,
-- 'B' will be green on black, 
-- 'C' will be red on white, and
-- 'D' will be blue on black.
Implementation: See builtins\pscreen.e (an autoinclude) for details of the actual implementation.
See Also: save_text_image, put_screen_char