GEMLIB
0.44.0
|
raster functions More...
Functions | |
void | v_get_pixel (VdiHdl, short x, short y, short *pel, short *color_idx) |
void | vr_trnfm (VdiHdl, MFDB *src, MFDB *dst) |
void | vro_cpyfm (VdiHdl, short mode, short pxy[], MFDB *src, MFDB *dst) |
void | vrt_cpyfm (VdiHdl, short mode, short pxy[], MFDB *src, MFDB *dst, short color[]) |
raster functions
todo: add description here
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.
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 |
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.
References VDI_CNTRLMAX.
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...
handle | Device handle |
src | pointer to the source MFDB |
dst | pointer to the destination MFDB |
References VDI_CNTRLMAX.
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.
handle | Device handle |
mode | logical operation
|
pxy | coordinates
|
src | pointer to the source MFDB |
dst | pointer to the destination MFDB |
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).
References VDI_CNTRLMAX.
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.
handle | Device handle |
mode | writing mode |
pxy | coordinates
|
src | pointer to the source MFDB |
dst | pointer to the destination MFDB |
color |
|
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).
References VDI_CNTRLMAX.