Files
FireBee_Setup/tools/vision/LDV/doc/english/vapi/ra.htm
2022-11-14 10:05:42 +01:00

761 lines
31 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>VISION Documentation (VAPI): Raster Index Interface</title></head>
<body background="../images/conc2.gif" bgcolor="#ffffff">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="pr.htm"><img src="../images/cprev.jpg" alt="Previous Chapter " border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="27" hspace="2" width="32"></a><a href="co.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Next Chapter" hspace="2"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
<em>(VAPI)</em></strong></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Last update 08/04/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip"><br></a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>RASTER
INTERFACE</strong></font></p>
</td>
<td align="center" width="17%"></td>
</tr>
</tbody></table>
</center></div>
<hr>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td colspan="2" align="center"><strong>Summary</strong></td>
</tr>
<tr>
<td width="15%"><strong>Interface prefix</strong></td>
<td width="85%">Ra</td>
</tr>
<tr>
<td width="15%"><strong>Number of functions</strong></td>
<td width="85%">16</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Set of functions allowing to handle image rasters
under different formats (bit-plane, True Color, ATARI formats,
specific, standard...).</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaImgWhite"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaImgWhite</strong>(MFDB
*img)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> img: pointer
on the image to process</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Initialise an image raster with the white colour.
The expected format is the <a href="../notions.htm#formats%20d%27images">ATARI format</a>.
In palette mode (img-&gt;fd_nplanes &lt;= 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.</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">This function processes the transformation
"in place".</td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaIs15Bits"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>RaIs15Bits</strong>(void)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">0: True Color format on 16 bits or
number of bits of the graphic resolution not equal to
16<br>
1: Number of planes of the graphic resolution on 16 bits but pixel
coding on 15 bits (5 per component)</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Indicates whether the True Color coding of the
graphic resolution is on 15 or 16 bits</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">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)</td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaTCConvert"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaTCConvert</strong>(MFDB
*img)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> img: pointer
on the image to process</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Transforms a True Color raster of the specific
format of the graphic card to a True Color raster in
<a href="../notions.htm#formats%20d%27images">ATARI format</a></td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">This function processes the transformation
"in place". If <em><strong>VISION</strong></em>
recognises that the machine specific format is the ATARI format,
the function returns immediately, without any processing. This
function is the reverse of <a href="#RiTCInvConvert">RiTCInvConvert</a></td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaTCInvConvert"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaTCInvConvert</strong>(MFDB
*img)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> img: pointer
on the image to process</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Transforms a True Color raster in
<a href="../notions.htm#formats%20d%27images">ATARI format</a>
to a True Color raster in the format specific to the graphic card</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">This function processes the transformation
"in place". If <em><strong>VISION</strong></em>
recognises that the machine specific format is the ATARI format,
the function returns immediately, without any processing.
This function is the reverse of <a href="#RiTCConvert">RiTCInvConvert</a></td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaInd2RasterInit"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaInd2RasterInit</strong>(MFDB
*img, long width)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> img: pointer
on the image to process<br>
<strong>[IN] </strong>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.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Prepares index transfer operatios to an image
raster in <a href="../notions.htm#formats%20d%27images">ATARI format</a>.</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">The width may seem redundant with
img-&gt;fd_w but it is there because VISION always set
img-&gt;fd_w to a multiple of 16 (internal optimisations). Thus,
width allows not to be limited to a width multiple of 16 pixels.<br>
<u>Interesting</u> : if width is a multiple of 16, the
RaInd2Raster function will be much faster!</td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaInd2Raster"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaInd2Raster</strong>(unsigned
char*indexes, long nb_indexes)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> indexes: pointer
on the TOS table indexes to convert to the raster previously
initialised with the <a href="#RaInd2RasterInit">RaInd2RasterInit</a> function<br>
<strong>[IN] </strong>nb_indexes: Number of indexes in the table
pointed by indexes</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Converts TOS indexes in raster bit-plane data</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">Once the initialisation is done by the
<a href="#RaInd2RasterInit">RaInd2RasterInit</a> 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-&gt;RaInd2RasterInit( img, wished_width ) ;<br>
for ( y = 0; y &lt; img-&gt;fd_h; y++ )<br>
{<br>
GetTosIndexes( y, tab_indexes, &amp;nb_indexes ) ; /*
Get TOS indexes for line y */<br>
Vapi-&gt;RaInd2Raster( tab_indexes, nb_indexes ) ; /*
Send to the ATARI bit-plane format raster */<br>
}</td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaRaster2Ind"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaRaster2Ind</strong>(short
*pt_bitplan, long nb_pts, long nb_planes, unsigned char
*tos_indexes)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> pt_bitplan:
pointer on the beginning of raster data to convert
(start with a multiple of 16 pixels)<br>
<strong>[IN] </strong>nb_pts: Number of points to
convert<br>
<strong>[IN] </strong>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.<br>
<strong>[OUT] </strong>tos_indexes: pointer on the
TOS indexes table receiving the data (must be dimensioned to
nb_pts bytes)</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Converts bit-plane data from the raster to TOS
indexes</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">Reverse function of <a href="#RaInd2Raster">RaInd2Raster</a></td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaGetTOS2VDIArray"></a><strong>Prototype</strong></td>
<td width="85%">unsigned char *cdecl <strong>RaGetTOS2VDIArray</strong>(long
nb_planes)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> 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.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">Pointeur on the conversion table
TOS index --&gt; VDI index</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Get the matching table between TOS and VDI
indexes, for a given number of planes</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">Reverse function of <a href="#RaGetVDI2TOSArray">RaGetVDI2TOSArray</a></td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaGetVDI2TOSArray"></a><strong>Prototype</strong></td>
<td width="85%">unsigned char *cdecl <strong>RaGetVDI2TOSArray</strong>(long
nb_planes)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> 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.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">Pointeur on the conversion table
VDI index --&gt; TOS index</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Get the matching table between VDI and TOS
indexes, for a given number of planes</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">Reverse function of <a href="#RaGetTOS2VDIArray">RaGetTOS2VDIArray</a></td>
</tr>
<tr>
<td width="15%"><strong>VAPI version</strong></td>
<td width="85%">1.00 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaGetImgSize"></a><strong>Prototype</strong></td>
<td width="85%">unsigned long *cdecl <font size="3"><strong>RaGetImgSize</strong></font>(long
width, long height, long nplanes)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> width : Image width in pixels number<br>
<strong>[IN]</strong> height : Image height in pixels number<br>
<strong>[IN]</strong> nplanes : Number of planes per pixel<br>32bit variable sizes is just here for 32bit compilers compatibility.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">The required memory size, in bytes, to hold the image</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Used to know the image size, the 16 pixels alignement taken into account</td>
</tr>
<tr>
<td width="15%"><strong>Comments</strong></td>
<td width="85%">&nbsp;</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.02&nbsp;or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaRasterAlloc"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>RaRasterAlloc</strong>(MFDB
*raster)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> raster :
VDI structure defining an image</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">0 : OK, memory has been allocated (pointed out by fd_addr field of MFDB structure)<br>
!= 0 : Error (not enough memory)</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Allocate an image based on its definition (fd_w, fd_h and fd_nplanes MFDB structure fields).</td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">Upon success, fd_addr points to image data (not initialized), else fd_addr is set to NULL.<br>
fd_wdwidth is updated, other fileds remain unchanged.</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.02&nbsp;or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaRasterFree"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaRasterFree</strong>(MFDB
*raster)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN/OUT]</strong> raster :&nbsp;VDI structure defining an image</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Free previously allocated memory by<a href="ra.htm#RaRasterAlloc"> RaRasterAlloc</a></td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">All MFDB fileds are set to zero after memory being freed.</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.02&nbsp;or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table style="width: 100%;" border="2">
<tbody><tr>
<td width="15%"><a name="RaTC15RemapColors"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaTC15RemapColors</strong>(<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> *rc)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> rc : Pointer to a&nbsp;<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
structure defining elementary color changes, first pixel to change and number of pixels to operate on.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None.</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Change the current color spreading of a 15bit True Color image. red, green and blue fields of&nbsp; <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> shall point to arrays of &nbsp;32 (32 = 2^5)&nbsp;elements,
each element being the value to substitute at this array index for instance the formula:<br>
red[i] = i ; (0 &lt;= i &lt; 32) does not change anything (i being replaced by i).<br>
Warining ! The new value to substitute shall belong to range [0,31].<br>
Another example:: rise lighting by 100% for all compounds:<br>
new_val = i * 2 ;<br>
if ( new_val &gt; 31) new_val = 31 ; /* Important ! */<br>
red[i] = green[i] = blue[i] = new_val ;</td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">This function operates on <span style="text-decoration: underline;">Machine specific format </span>! You shall not call <a href="ra.htm#RaTCConvert">RaTCConvert</a> or <a href="ra.htm#RaTCInvConvert">RaTCInvConvert</a>.</td>
</tr>
<tr>
<td style="width: 15%;"><strong>VAPI </strong><strong>Version</strong><strong>&nbsp;</strong></td>
<td width="85%">1.03 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaTC16RemapColors"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaTC16RemapColors</strong>(<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> *rc)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> rc : Pointer to a&nbsp;<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
structure defining elementary color changes, first pixel to change and number of pixels to operate on.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Change the current color spreading of a 16bit True Color image. red, green and blue fields of&nbsp; <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
shall point to arrays of &nbsp;32 (32 = 2^5)&nbsp;elements for red and
blue compounds and 64 (64=2^6) for green compound. Each element being
the value to substitute at this array index for instance the formula:<br>
red[i] = i ; (0 &lt;= i &lt; 32) does not change anything (i being replaced by i).<br>
Warining ! The new value to substitute shall belong to range [0,31] for red and blue and [0;63] for green.<br>
Another example:: rise lighting by 100% for green compound:<br>
new_val = i * 2 ;<br>
if ( new_val &gt; 63) new_val = 63 ; /* Important ! */<br>
green[i] = new_val ; /*&nbsp;For 0 &lt;= i &lt; 64) */<br></td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">This function operates on <span style="text-decoration: underline;">Machine specific format </span>! You shall not call <a href="ra.htm#RaTCConvert">RaTCConvert</a> or <a href="ra.htm#RaTCInvConvert">RaTCInvConvert</a>.</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.03 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaTC32RemapColors"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaTC32RemapColors</strong>(<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> *rc)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> rc :&nbsp;Pointer to a&nbsp;<a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
structure defining elementary color changes, first pixel to change and number of pixels to operate on.</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Change the current color spreading of a 32bit True Color image. red, green and blue fields of&nbsp; <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
shall point to arrays of &nbsp;256 (256=2^8) elements&nbsp;each element
being the value to substitute at this array index for instance the
formula::<br>
red[i] = i ; (0 &lt;= i &lt; 256) does not change anything (i being replaced by i).<br>
Warining ! The new value to substitute shall belong to range [0,255].<br>
Another example:: lower lighting by 20% for all compounds:<br>
new_val = (80 * i) / 100 ;<br>
/* Note that we still stay in [0;255] range
...*/<br>
red[i] = green[i] = blue[i] = new_val ; /* For&nbsp;0 &lt;= i
&lt; 256) */</td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">This function operates on <span style="text-decoration: underline;">Machine specific format </span>! You shall not call <a href="ra.htm#RaTCConvert">RaTCConvert</a> or <a href="ra.htm#RaTCInvConvert">RaTCInvConvert</a>.</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.03 or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaRasterRotateGetDstMFDB"></a><strong>Prototype</strong></td>
<td width="85%">void cdecl <strong>RaRasterRotateGetDstMFDB</strong>(MFDB
*in, MFDB *out, long angle)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> in : MFDB
describing image to be rotated<br>
<strong>[OUT]</strong>out : destination MFDB<br>
<strong>[IN]</strong> angle : Angle in degrees for the rotation</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">None</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Used
to know the the width/height after rotation in order to proper allocate
the required memory. All fileds but fd_addr are set as the memory is
NOT allocated.</td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">You should call this function right before the next one.</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.03&nbsp;or greater</td>
</tr>
</tbody></table>
</center></div>
<p>&nbsp;</p>
<div align="center"><center>
<table border="2" width="100%">
<tbody><tr>
<td width="15%"><a name="RaRasterRotate"></a><strong>Prototype</strong></td>
<td width="85%">long cdecl <strong>RaRasterRotate</strong>(MFDB
*in, MFDB *out, long angle, long flags)</td>
</tr>
<tr>
<td width="15%"><strong>Parameters</strong></td>
<td width="85%"><strong>[IN]</strong> in :&nbsp;MFDB
describing image to be rotated<br>
<strong>[OUT]</strong>out : Destination MFDB<br>
<strong>[IN]</strong> angle :&nbsp;Angle in degrees for the rotation<br>
<strong>[IN]</strong> flags : if bit#0 is set, inform&nbsp;<a href="index.htm">VAPI</a>
to display a progress window</td>
</tr>
<tr>
<td width="15%"><strong>Return</strong></td>
<td width="85%">ELDV_NOERROR : life's good<br>
ELDV_NOTENOUGHMEMORY : crystal clear...<br>
ELDV_CANCELLED : (only possible if progress window is requested)<br>
ELDV_GENERALFAILURE :&nbsp;crystal clear...</td>
</tr>
<tr>
<td width="15%"><strong>Description</strong></td>
<td width="85%">Perform
the requested rotation. Destination MFDB should be allocated or this
function will allocate it. Note that this last option is a bit
dangerous as it is now up to the LDV to call&nbsp;<a href="ra.htm#RaRasterFree">RaRasterFree</a> to free it. Good news is that&nbsp;<a href="index.htm">VAPI</a> uses standard VDI format if necessary.</td>
</tr>
<tr>
<td width="15%"><strong>Remarks</strong></td>
<td width="85%">If angle is a multiple of 90degrees, specific routines will be called to avoid un-necessary sinus and cosinus computations</td>
</tr>
<tr>
<td width="15%"><strong>VAPI </strong><strong>Version</strong></td>
<td width="85%">1.03&nbsp;or greater</td>
</tr>
</tbody></table>
</center></div>
<hr>
<hr>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="pr.htm"><img src="../images/cprev.jpg" alt="Previous chapter " border="0" height="26" hspace="2" width="46"></a><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="co.htm"><img style="border: 0px solid ; width: 43px; height: 26px;" src="../images/csuiv.jpg" alt="Next Chapter" hspace="2"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
<em>(VAPI)</em></strong></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Last update&nbsp;08/04/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip"><br></a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>RASTER
INTERFACE</strong></font></p>
</td>
<td valign="top" width="17%">&nbsp; </td>
</tr>
</tbody></table>
</center></div>
</body></html>