Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

drawing_mode(3G)

echo_type(3G)

DEFINE_RASTER_ECHO(3G)

NAME

define_raster_echo − define a raster echo to be used on an output device. 

SYNOPSIS

C Syntax:

void define_raster_echo(fildes,echo_num,dx,dy,posdx,posdy, rule,source);
int fildes,echo_num,dx,dy,posdx,posdy,rule;
unsigned char source[];

FORTRAN77 Syntax:

subroutine define_raster_echo(fildes,echo_num,dx,dy,
posdx,posdy,rule,source)
integer*4 fildes,echo_num,dx,dy,posdx,posdy,rule
integer*4 source()

Pascal Syntax:

type gbyte=0..255;

procedure define_raster_echo(fildes,echo_num,dx,dy,
posdx,posdy,rule:integer;var source:packed array[lo..hi] of gbyte);

DESCRIPTION

Input Variables

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

echo_num Selects the echo for devices that support more than one simultaneous echo.  For single echo devices, use 0 (zero). 

dx,dy Rectangle dimensions in pixels. 

posdx and posdy Define a coordinate point (hot spot) in the raster rectangle that maps to the echo position defined by the x and y offset from the upper left corner. 

rule Replacement rule used to combine the echo with the frame buffer.  See drawing_mode for further information. 

source Contains source pixel information. 

Discussion

define_raster_echo uses the source pixel information, interpreted as a dx by dy pixel rectangle, to define the raster echo type #7. 

The frame buffer reads the rectangle then combines the raster data with the frame buffer, using the replacement rule specified by rule. The saved rectangle is written into the frame buffer when the echo is removed, making a non-destructive echo.

For multi-bank graphics devices that have been set to CMAP_FULL by shade_mode, the raster echo can be defined for only one bank at a time.  Therefore this function defines the raster echo only for the currently selected bank, as set by bank_switch. Raster echoes can be defined for the other banks by selecting them with bank_switch and calling define_raster_echo again.  When CMAP_NORMAL or CMAP_MONOTONIC is set, the raster echo is sent to all banks simultaneously. 

When raster echo is enabled, it will be written into all graphics planes by default.  See the appropriate device driver description for more information. 

The following C program segment shows how to define the raster echo as a pointing finger with the "hot spot" being the finger tip. 

 

#define byte unsigned char
static byte hand[16][9]={0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,
                            0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
                            0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
                            0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
                            0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0};
  echo_num = 0;
 dx = 16; dy = 9;/* rectangle dimensions.          */
 posdx = 15; posdy = 3;/* over 15 down 3 to position
   in front of finger tip.        */
 rule = 7;/* replacement rule to "or" hand
   with contents of frame buffer. */
 define_raster_echo(fildes,echo_num,dx,dy,posdx,posdy,rule,hand);

DEFAULTS

Device-dependent default raster definition. See the appropriate device driver description for details. 

SEE ALSO

drawing_mode(3G), echo_type(3G), Starbase Device Drivers Library.

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026