Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ define_rast(3G) — HP-UX 5.00

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:array[lo..hi] of gbyte);

HP-UX COMPATIBILITY

Level: HP-UX/STANDARD

Origin: HP

DESCRIPTION

INPUT VARIABLES

fildes
is an 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
are the 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
is the 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. 
 
The following portion of a c program 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. See the appropriate device driver description for details. 

SEE ALSO

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

Hewlett-Packard  —  last mod. May 11, 2021

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