Previous Chapter Back to content   Next Chapter

VISION Documentation (VAPI)

Last update 01/10/00

Download documentation

RASTER INTERFACE

 

Summary
Interface prefix Ra
Number of functions 8
Description Set of functions allowing to handle image rasters under different formats (bit-plane, True Color, ATARI formats, specific, standard...).

 

 

Prototype void cdecl RaImgWhite(MFDB *img)
Parameters [IN/OUT] img: pointer on the image to process
Return None
Description Initialise an image raster with the white colour. The expected format is the ATARI format. In palette mode (img->fd_nplanes <= 8), the raster is initialised with bits set to 0 (TOS/VID index = 0), the 0 index of the palette is usually set on the white colour.
Comments This function processes the transformation "in place".
VAPI version 1.00 or greater

 

Prototype long cdecl RaIs15Bits(void)
Parameters None
Return 0: True Color format on 16 bits or number of bits of the graphic resolution not equal to 16
1: Number of planes of the graphic resolution on 16 bits but pixel coding on 15 bits (5 per component)
Description Indicates whether the True Color coding of the graphic resolution is on 15 or 16 bits
Comments In cases where it is useful to know whether the number of bits of coding for the green component is on 5 or 6 bits, it is possible, using this function, to know whether all the 16 bits of the True Color mode on 16 planes are used (green component is then coded on 6 bits instead of 5 and RaIs51Bits returns 0) or only 15 bits are used (green component is then coded on 5 bits and RaIs15Bits returns 1)
VAPI version 1.00 or greater

 

Prototype void cdecl RaTCConvert(MFDB *img)
Parameters [IN/OUT] img: pointer on the image to process
Return None
Description Transforms a True Color raster of the specific format of the graphic card to a True Color raster in ATARI format
Comments This function processes the transformation "in place". If VISION recognises that the machine specific format is the ATARI format, the function returns immediately, without any processing. This function is the reverse of RiTCInvConvert
VAPI version 1.00 or greater

 

Prototype void cdecl RaTCInvConvert(MFDB *img)
Parameters [IN/OUT] img: pointer on the image to process
Return None
Description Transforms a True Color raster in ATARI format to a True Color raster in the format specific to the graphic card
Comments This function processes the transformation "in place". If VISION recognises that the machine specific format is the ATARI format, the function returns immediately, without any processing. This function is the reverse of RiTCInvConvert
VAPI version 1.00 or greater

 

Prototype void cdecl RaInd2RasterInit(MFDB *img, long width)
Parameters [IN/OUT] img: pointer on the image to process
[IN] width: maximum width (in pixels). width cannot be greater than 32767. Coding on a 32 bits integer is only for ensuring compatibility with 32 bits compilers.
Return None
Description Prepares index transfer operatios to an image raster in ATARI format.
Comments The width may seem redundant with img->fd_w but it is there because VISION always set img->fd_w to a multiple of 16 (internal optimisations). Thus, width allows not to be limited to a width multiple of 16 pixels.
Interesting : if width is a multiple of 16, the RaInd2Raster function will be much faster!
VAPI version 1.00 or greater

 

Prototype void cdecl RaInd2Raster(unsigned char*indexes, long nb_indexes)
Parameters [IN] indexes: pointer on the TOS table indexes to convert to the raster previously initialised with the RaInd2RasterInit function
[IN] nb_indexes: Number of indexes in the table pointed by indexes
Return None
Description Converts TOS indexes in raster bit-plane data
Comments Once the initialisation is done by the RaInd2RasterInit functio, this function may be called as much as wanted to transform the data flow (TOS indexes) to the image raster. VAPI memorises the last position in the raster. For instance: Vapi->RaInd2RasterInit( img, wished_width ) ;
for ( y = 0; y < img->fd_h; y++ )
{
GetTosIndexes( y, tab_indexes, &nb_indexes ) ; /* Get TOS indexes for line y */
Vapi->RaInd2Raster( tab_indexes, nb_indexes ) ; /* Send to the ATARI bit-plane format raster */
}
VAPI version 1.00 or greater

 

Prototype void cdecl RaRaster2Ind(short *pt_bitplan, long nb_pts, long nb_planes, unsigned char *tos_indexes)
Parameters [IN] pt_bitplan: pointer on the beginning of raster data to convert (start with a multiple of 16 pixels)
[IN] nb_pts: Number of points to convert
[IN] nb_planes: Number of planes of the image raster. nb_planes can only take values 1, 2, 4, or 8. Coding on a 32 bits integer is only for ensuring compatibility with 32 bits compilers.
[OUT] tos_indexes: pointer on the TOS indexes table receiving the data (must be dimensioned to nb_pts bytes)
Return None
Description Converts bit-plane data from the raster to TOS indexes
Comments Reverse function of RaInd2Raster
VAPI version 1.00 or greater

 

Prototype unsigned char *cdecl RaGetTOS2VDIArray(long nb_planes)
Parameters [IN] nb_planes: Number of plans. nb_planes can only take values 1, 2, 4, or 8. Coding on a 32 bits integer is only for ensuring compatibility with 32 bits compilers.
Return Pointeur on the conversion table TOS index --> VDI index
Description Get the matching table between TOS and VDI indexes, for a given number of planes
Comments Reverse function of RaGetVDI2TOSArray
VAPI version 1.00 or greater

 

Prototype unsigned char *cdecl RaGetVDI2TOSArray(long nb_planes)
Parameters [IN] nb_planes: Number of planes. nb_planes can only take values 1, 2, 4, or 8. Coding on a 32 bits integer is only for ensuring compatibility with 32 bits compilers.
Return Pointeur on the conversion table VDI index --> TOS index
Description Get the matching table between VDI and TOS indexes, for a given number of planes
Comments Reverse function of RaGetTOS2VDIArray
VAPI version 1.00 or greater

 


Previous chapter Back to content   Next Chapter

VISION Documentation (VAPI)

Last update 01/10/00

Download documentation

RASTER INTERFACE