Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

VDI raster functions
[VDI Function Reference]

raster functions More...

Functions

void v_get_pixel (short, short x, short y, short *pel, short *color_idx)
void vr_trnfm (short, MFDB *src, MFDB *dst)
void vro_cpyfm (short, short mode, short pxy[], MFDB *src, MFDB *dst)
void vrt_cpyfm (short, short mode, short pxy[], MFDB *src, MFDB *dst, short color[])

Detailed Description

raster functions

todo: add description here


Function Documentation

void v_get_pixel short  handle,
short  x,
short  y,
short pel,
short index
 

On a device with up to 8 planes (256 simultaneously displayable colors) this function returns the value and the color index of a pixel.

Parameters:
handle Device handle
x 
y 
pel pixel value
[option CHECK_NULLPTR] pel may be NULL
index color index
[option CHECK_NULLPTR] index may be NULL
Since:
all VDI versions (screen drivers only)
In HiColor (15 or 16 bits) pel contains the pixel value and index is usually -1.

In TrueColor pel ist the low word and index the high word of the pixel value.

void vr_trnfm short  handle,
MFDB src,
MFDB dst
 

transforms a raster from standard format to device-specific format and vice-versa. The transformation can be "in place" which means that both MFDBs point to the same address. In this case transforming a big bitmap takes ages...

Parameters:
handle Device handle
src pointer to the source MFDB
dst pointer to the destination MFDB
Since:
all VDI versions

void vro_cpyfm short  handle,
short  mode,
short  pxy[],
MFDB src,
MFDB dst
 

copies a rectangular raster onto another rectangular raster and performs the specified logic operations. Both rasters must be in device-specific format or they must have only one plane.

Parameters:
handle Device handle
mode logical operation
  • 0: result=0
  • 1: result=source and destination
  • 2: result=source and (not destination)
  • 3: result=source
  • 4: result=(not source) and destination
  • 5: result=destination (!)
  • 6: result=source xor destination
  • 7: result=source or destination
  • 8: result=not (source or destination)
  • 9: result=not (source xor destination)
  • 10: result=not destination
  • 11: result=source or (not destination)
  • 12: result=not source
  • 13: result=(not source) or destination
  • 14: result=not (source and destination)
  • 15: result=1
pxy coordinates
  • xyarr[0..3]: coordinates of the source rectangle
  • xyarr[4..7]: coordinates of the destination rectangle
src pointer to the source MFDB
dst pointer to the destination MFDB
Since:
all VDI versions (extended since NVDI 4.10)
If the screen (or the device specified by handle) is the source or destination of a raster operation, the MFDB structure element fd_addr should be zero!

The clipping rectangle for the destination raster is enabled only if fd_addr of the destination MFDB is zero.

The source rectangle will not be clipped (it must be within the raster area).

Note:
Usually vro_cpyfm() ignores the height and width of the destination rectangle and uses the size of the source. If you want to scale a bitmap, you have to set the most significant bit in the transfer mode (wr_mode | 0x8000). In this case vro_cpyfm() scales the bitmap according to the size of the destination rectangle. Wheter the driver is able to scale or not is returned by vq_extnd() in work_out[30] (you are only allowed to set the upper bit of the mode if it is able to).

void vrt_cpyfm short  handle,
short  mode,
short  pxy[],
MFDB src,
MFDB dst,
short  color[]
 

This function expands a monochrome raster (one plane) considering the foreground and background color and copies the raster onto the destination raster using the specified writing mode.

Parameters:
handle Device handle
mode writing mode
pxy coordinates
  • xyarr[0..3]: coordinates of the source rectangle
  • xyarr[4..7]: coordinates of the destination rectangle
src pointer to the source MFDB
dst pointer to the destination MFDB
color 
  • color[0] : color index for "black" points
  • color[1] : color index for "white" points
Since:
all VDI versions
If the screen is the destination raster, fd_addr should be zero!

Note:
Usually vrt_cpyfm() ignores the height and width of the destination rectangle and uses the size of the source. If you want to scale a bitmap, you have to set the most significant bit in the transfer mode (wr_mode | 0x8000). In this case vrt_cpyfm() scales the bitmap according to the size of the destination rectangle. Wheter the driver is able to scale or not is returned by vq_extnd() in work_out[30] (you are only allowed to set the upper bit of the mode if it is able to).


Generated on Wed Nov 3 22:42:21 2004 for GEMLIB by  doxygen 1.3.9.1