BLOCK_WRITE(3G)
NAME
block_write, dcblock_write, intblock_write − main memory to frame buffer block transfer procedure.
SYNOPSIS
C Syntax:
void block_write(fildes,x_dest, y_dest,length_x,length_y,pixel_data,raw);
int fildes;
float x_dest,y_dest;
int length_x,length_y,raw;
unsigned char pixel_data[];
void intblock_write(fildes,x_dest, y_dest,length_x,length_y,pixel_data,raw);
int fildes,x_dest,y_dest,length_x,length_y,raw;
unsigned char pixel_data[];
void dcblock_write(fildes,x_dest,y_dest, length_x,length_y,pixel_data,raw);
int fildes,x_dest,y_dest,length_x,length_y,raw;
unsigned char pixel_data[];
FORTRAN77 Syntax:
subroutine block_write(fildes,x_dest,y_dest, length_x,length_y,pixel_data,raw)
integer*4 fildes
real x_dest,y_dest
integer*4 length_x,length_y,raw
character*(*) pixel_data()
subroutine intblock_write(fildes,x_dest,y_dest, length_x,length_y,pixel_data,raw)
integer*4 fildes,x_dest,y_dest,length_x,length_y,raw
character*(*) pixel_data()
subroutine dcblock_write(fildes,x_dest,y_dest, length_x,length_y,pixel_data,raw)
integer*4 fildes,x_dest,y_dest,length_x,length_y,raw
character*(*) pixel_data()
Pascal Syntax:
type
gbyte=0..255;
procedure block_write(fildes:integer; x_dest,y_dest:real;length_x,length_y:integer; var pixel_data:packed array[lo..hi:integer] of gbyte;raw:integer);
procedure intblock_write (fildes:integer;x_dest,y_dest,length_x,length_y:integer; var pixel_data:packed array[lo..hi:integer] of gbyte; raw:integer);
procedure dcblock_write (fildes:integer;x_dest,y_dest,length_x,length_y:integer; var pixel_data:packed array[lo..hi:integer] of gbyte; raw:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
x_dest,y_dest Coordinates of upper left corner of the destination in virtual device coordinates (block_write, intblock_write), or device coordinates (dcblock_write).
length_x,length_y
Length of the sides of the block to be written in pixels.
pixel_data Packed array of pixel data to be transferred (written) to the frame buffer by the procedure.
raw If FALSE (0), each pixel is written as a 1-byte quantity. There are no padding bytes. Therefore, with FORTRAN, four pixels are written for each 32 bit integer array element.
If TRUE (1), data is organized in a device-dependent format. Some devices may format the device with multiple pixels per byte. Other devices may allow different formats that can be set with a call to the gescape R_BIT_MODE. Other functions, such as clipping, may also behave in a device dependent manner. See the Starbase Device Driver Library Manual for details.
Discussion
Pixel data is considered to be a length_x by length_y byte rectangle for the following discussion. The pixel_data array contains values that are to be combined with the frame buffer destination rectangle beginning at location (x_dest,y_dest) having dimensions of length_x and length_y using the current drawing_mode and write_enable. Pixels are read from the array in order: left to right, then top to bottom. If the clip_indicator is not CLIP_OFF, frame buffer values outside the intersection of the destination rectangle and the current clip boundaries are left untouched. In all cases the dimensions of the pixel_data source rectangle is preserved.
This is the exact inverse operation of block_read (except for write_enable).
For multi-plane graphics devices, the block write goes to the currently selected bank as set by bank_switch.
For device independent operation do not use raw mode. Raw mode should only be used where speed of image read is critical and the number of pixels read is not critical. This speed improvement is significant only if the device frame buffer organization is not a byte or word per pixel.
Block_write and intblock_write are done using Virtual Device Coordinate values and dcblock_write is done using Device Coordinate values.
Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes . Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase(3G) manual page.
SEE ALSO
bank_switch(3G), block_move(3G), block_read(3G), clip_indicator(3G), clip_rectangle(3G), drawing_mode(3G), write_enable(3G).
Hewlett-Packard Company — May 11, 2021