initial commit
This commit is contained in:
900
tools/vision/LDV/doc/vapi/ra.htm
Normal file
900
tools/vision/LDV/doc/vapi/ra.htm
Normal file
@@ -0,0 +1,900 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Documentation VISION (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%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="pr.htm"><img
|
||||
src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="../images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="32"
|
||||
height="27"></a><a href="co.htm"><img
|
||||
src="../images/csuiv.jpg" alt="Chapitre suivant"
|
||||
border="0" hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="../images/icoprinc.gif"
|
||||
width="59" height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="../images/icointro.gif"
|
||||
width="59" height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->04/01/02<!--webbot
|
||||
bot="Timestamp" i-checksum="12484" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>RASTER
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td align="center" width="17%"> <!--webbot
|
||||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||||
BORDER=0></A>
|
||||
<!--webbot
|
||||
bot="HTMLMarkup" endspan --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<tr>
|
||||
<td align="center" colspan="2"><strong>R<EFBFBD>sum<EFBFBD></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Pr<EFBFBD>fixe de l'interface</strong></td>
|
||||
<td width="85%">Ra</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Nombre de fonctions</strong></td>
|
||||
<td width="85%">16</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Ensemble de fonctions permettant de
|
||||
manipuler des rasters image sous diff<66>rents formats
|
||||
(bit-plan, True Color, formats ATARI, sp<73>cifique,
|
||||
standard...).</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
||||
sur l'image <20> traiter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Initialise un raster image avec la
|
||||
couleur blanche. Le format attendu est le <a
|
||||
href="../notions.htm#formats d'images">format ATARI</a>.
|
||||
En mode palette (img->fd_nplanes <= 8), le raster
|
||||
est initialis<69> avec des bits mis <20> 0 (index TOS/VDI =
|
||||
0), l'indice 0 de la palette est g<>n<EFBFBD>ralement
|
||||
positionn<6E> sur la couleur blanche.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction effectue la transformation
|
||||
"sur place".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">0 : Format True Color sur 16 bits ou
|
||||
nombre de bits de la r<>solution graphique diff<66>rent de
|
||||
16<br>
|
||||
1 : Nombre de plans de la r<>solution graphique sur 16
|
||||
bits mais codage des pixels sur 15 bits (5 par
|
||||
composante)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Indique si le codage True Color de la
|
||||
r<>solution graphique courante est sur 15 ou 16 bits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Au cas o<> il est important de savoir si
|
||||
le nombre de bits de codage de la composante verte est
|
||||
sur 5 ou 6 bits, on peut par cette fonction savoir si
|
||||
tous les 16 bits du mode True Color sur 16 plans sont
|
||||
utilis<69>s (la composante verte est alors cod<6F>e sur 6
|
||||
bits au lieu de 5 et RaIs15Bits renvoie 0) ou si seuls 15
|
||||
bits sont utiles (la composante verte est alors cod<6F>e
|
||||
sur 5 bits et RaIs15Bits renvoie 1)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
||||
sur l'image <20> traiter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Transforme un raster True Color au format
|
||||
sp<73>cifique de la carte graphique en un raster True Color
|
||||
au <a href="../notions.htm#formats d'images">format ATARI</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction effectue la transformation
|
||||
"sur place". Si <em><strong>VISION</strong></em>
|
||||
se rend compte que le format sp<73>cifique de la machine
|
||||
est le format ATARI, la fonction rend imm<6D>diatement la
|
||||
main, sans effectuer de traitement. Cette fonction est
|
||||
l'inverse de <a href="#RiTCInvConvert">RaTCInvConvert</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
||||
sur l'image <20> traiter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Transforme un raster True Color au <a
|
||||
href="../notions.htm#formats d'images">format ATARI</a>
|
||||
en un raster True Color au format sp<73>cifique de la carte
|
||||
graphique</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction effectue la transformation
|
||||
"sur place". Si <em><strong>VISION</strong></em>
|
||||
se rend compte que le format sp<73>cifique de la machine
|
||||
est le format ATARI, la fonction rend imm<6D>diatement la
|
||||
main, sans effectuer de traitement. Cette fonction est
|
||||
l'inverse de <a href="#RiTCConvert">RaTCInvConvert</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
||||
sur l'image <20> traiter<br>
|
||||
<strong>[IN] </strong>width : largeur (en pixels)
|
||||
maximale <20> ne pas d<>passer. width ne peut d<>passer
|
||||
32767. Le codage sur un entier 32 bits ne sert qu'<27>
|
||||
assurer la compatibilit<69> avec les compilateurs 32 bits.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Pr<EFBFBD>pare des op<6F>rations de transfert
|
||||
d'index vers un raster image au <a
|
||||
href="../notions.htm#formats d'images">format ATARI</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Le param<61>tre width peut para<72>tre
|
||||
redondant avec img->fd_w mais il est l<> parce que <em><strong>VISION</strong></em>
|
||||
positionne toujours img->fd_w <20> un multiple de 16
|
||||
(optimisations internes). width permet donc de ne pas
|
||||
<20>tre limit<69> <20> une largeur multiple de 16 pixels.<br>
|
||||
<u>Int<EFBFBD>ressant</u> : si width est multiple de 16, la
|
||||
fonction RaInd2Raster sera bien plus rapide !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> indexes : pointeur
|
||||
sur le tableau d'indices TOS <20> converir vers le raster
|
||||
pr<70>c<EFBFBD>demment initialis<69> avec la fonction <a
|
||||
href="#RaInd2RasterInit">RaInd2RasterInit</a><br>
|
||||
<strong>[IN] </strong>nb_indexes : Nombre d'index dans le
|
||||
tableau point<6E> par indexes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Convertit les indices TOS en donn<6E>es
|
||||
bit-plan du raster</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Une fois l'initialisation faite par la
|
||||
fonction <a href="#RaInd2RasterInit">RaInd2RasterInit</a>,
|
||||
on peut appeler cette fonction autant de fois qu'on le
|
||||
veut afin de transformer le flux de donn<6E>es (indices
|
||||
TOS) vers le raster image. VAPI m<>morise la derni<6E>re
|
||||
position atteinte dans le raster. Par exemple :<br>
|
||||
Vapi->RaInd2RasterInit( img, wished_width ) ;<br>
|
||||
for ( y = 0; y < img->fd_h; y++ )<br>
|
||||
{<br>
|
||||
GetTosIndexes( y, tab_indexes, &nb_indexes ) ; /*
|
||||
Recupere les indices TOS pour la ligne y */<br>
|
||||
Vapi->RaInd2Raster( tab_indexes, nb_indexes ) ; /*
|
||||
Envoi vers le raster au format ATARI bit-plan */<br>
|
||||
}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> pt_bitplan :
|
||||
pointeur sur le d<>but des donn<6E>es raster <20> convertir
|
||||
(d<>marrage sur un multiple de 16 pixels)<br>
|
||||
<strong>[IN] </strong>nb_pts : Nombre de points <20>
|
||||
convertir<br>
|
||||
<strong>[IN] </strong>nb_planes : Nombre de plans du
|
||||
raster image. nb_planes ne peut prendre que les valeurs
|
||||
1, 2, 4, ou 8. Le codage sur un entier 32 bits ne sert
|
||||
qu'<27> assurer la compatibilit<69> avec les compilateurs 32
|
||||
bits.<br>
|
||||
<strong>[OUT] </strong>tos_indexes : pointeur vers le
|
||||
tableau d'indices TOS recevant les donn<6E>es (doit <20>tre
|
||||
dimensionn<6E> <20> nb_pts octets)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Convertit des donn<6E>es bit-plan du raster
|
||||
en indices TOS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Fonction r<>ciproque de <a
|
||||
href="#RaInd2Raster">RaInd2Raster</a>. Attention ! A
|
||||
cause des optimisations internes de la fonction, nb_pts
|
||||
DOIT <20>tre multiple de 16, sinon vous n'aurez pas les
|
||||
derneiers points (si vous sp<73>cifiez 35 points, vous n'en
|
||||
n'aurez que 32 en retour). Il vous faut donc ajuster
|
||||
nb_pts avant l'appel et sur-dimensionner de 16 points
|
||||
votre buffer tos_indexes de r<>ception pour <20>tre
|
||||
tranquille...</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> nb_planes : Nombre
|
||||
de plans. nb_planes ne peut prendre que les valeurs 1, 2,
|
||||
4, ou 8. Le codage sur un entier 32 bits ne sert qu'<27>
|
||||
assurer la compatibilit<69> avec les compilateurs 32 bits.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Pointeur sur le tableau de converion
|
||||
index TOS --> index VDI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">R<EFBFBD>cup<EFBFBD>rer le tableau de correspondance
|
||||
entre les indices TOS et VDI, pour un nombre de plans
|
||||
donn<6E></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Fonction r<>ciproque de <a
|
||||
href="#RaGetVDI2TOSArray">RaGetVDI2TOSArray</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> nb_planes : Nombre
|
||||
de plans. nb_planes ne peut prendre que les valeurs 1, 2,
|
||||
4, ou 8. Le codage sur un entier 32 bits ne sert qu'<27>
|
||||
assurer la compatibilit<69> avec les compilateurs 32 bits.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Pointeur sur le tableau de converion
|
||||
index VDI --> index TOS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">R<EFBFBD>cup<EFBFBD>rer le tableau de correspondance
|
||||
entre les indices VDI et TOS, pour un nombre de plans
|
||||
donn<6E></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Fonction r<>ciproque de <a
|
||||
href="#RaGetTOS2VDIArray">RaGetTOS2VDIArray</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.00 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> width : Largeur de
|
||||
l'image en nombre de pixels<br>
|
||||
<strong>[IN]</strong> height : Hauteur de l'image en
|
||||
nombre de pixels<br>
|
||||
<strong>[IN]</strong> nplanes : Nombre de plans pour
|
||||
coder un pixel<br>
|
||||
Le codage sur un entier 32 bits ne sert qu'<27> assurer la
|
||||
compatibilit<69> avec les compilateurs 32 bits.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">La taille m<>moire n<>cessaire (en
|
||||
octets) pour contenir une telle image.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Permet de connaitre la taille d'une image
|
||||
compte tenu des contraintes d'alignement VDI sur 16
|
||||
pixels.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.02 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> raster :
|
||||
Structure VDI d<>crivant une image</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">0 : OK, l'image a <20>t<EFBFBD> allou<6F>e (point<6E>
|
||||
par le champ fd_addr de la structure MFDB)<br>
|
||||
!= 0 : Erreur (m<>moire)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Alloue une image d'apr<70>s les champs
|
||||
fd_w, fd_h et fd_nplanes de la strucuture MFDB.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Si succ<63>s le champ fd_addr pointe vers
|
||||
les donn<6E>es image (non initialis<69>es), sinon fd_addr
|
||||
vaut NULL<br>
|
||||
fd_wdwidth est aussi mis <20> jour. Les autres champs
|
||||
restent inchang<6E>s.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.02 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN/OUT]</strong> raster :
|
||||
Structure VDI d<>crivant une image</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Lib<EFBFBD>re une image pr<70>c<EFBFBD>demment allou<6F>e
|
||||
par <a href="#RaRasterAlloc">RaRasterAlloc</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Tous les champs de la structure MFDB sont
|
||||
remis <20> z<>ro apr<70>s lib<69>ration.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.02 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> rc : Pointeur sur
|
||||
une structure de type <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
|
||||
d<>finissant la table de red<65>finition des couleurs
|
||||
<20>l<EFBFBD>mentaires, le d<>but du buffer <20> modifier et le
|
||||
nombre de points</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Modifie la r<>partition actuelle des
|
||||
couleurs d'une suite de points en True Color 15 bits. Les
|
||||
champs red, green et blue de la structure <a
|
||||
href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> doivent
|
||||
pointer sur des tableaux de 32 (32 = 2^5) <20>l<EFBFBD>ments,
|
||||
chaque <20>l<EFBFBD>ment du tableau devant d<>finir la valeur <20>
|
||||
substituer <20> l'indice de ce tableau, par exemple la
|
||||
formule:<br>
|
||||
red[i] = i ; (0 <= i < 32) ne change rien pour la
|
||||
table de la composante rouge (i sera remplac<61> par i).<br>
|
||||
Attention ! La nouvelle valeur substitu<74> doit appartenir
|
||||
<20> l'intervalle [0,31].<br>
|
||||
Exemple tout b<>te : augmenter la luminosit<69> de 100% sur
|
||||
toutes les composantes:<br>
|
||||
new_val = i * 2 ;<br>
|
||||
if ( new_val > 31) new_val = 31 ; /* Important ! */<br>
|
||||
red[i] = green[i] = blue[i] = new_val ;</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction travaille sur le <u>format
|
||||
sp<73>cifique de la machine</u> ! Inutile donc de passer
|
||||
par les fonctions <a href="#RaTCConvert">RaTCConvert</a>
|
||||
et <a href="#RaTCInvConvert">RaTCInvConvert</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.03 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> rc : Pointeur sur
|
||||
une structure de type <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
|
||||
d<>finissant la table de red<65>finition des couleurs
|
||||
<20>l<EFBFBD>mentaires, le d<>but du buffer <20> modifier et le
|
||||
nombre de points</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Modifie la r<>partition actuelle des
|
||||
couleurs d'une suite de points en True Color 16 bits. Les
|
||||
champs red, green et blue de la structure <a
|
||||
href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> doivent
|
||||
pointer sur des tableaux de 32 (32 = 2^5) <20>l<EFBFBD>ments pour
|
||||
red et blue, et 64 (64=2^6) pour green, chaque <20>l<EFBFBD>ment
|
||||
du tableau devant d<>finir la valeur <20> substituer <20>
|
||||
l'indice de ce tableau, par exemple la formule:<br>
|
||||
red[i] = i ; (0 <= i < 32) ne change rien pour la
|
||||
table de la composante rouge (i sera remplac<61> par i).<br>
|
||||
Attention ! La nouvelle valeur substitu<74> doit appartenir
|
||||
<20> l'intervalle [0,31] pour red et blue et [0,63] pour
|
||||
green.<br>
|
||||
Exemple tout b<>te : augmenter la luminosit<69> de 100% sur
|
||||
la composante verte:<br>
|
||||
new_val = i * 2 ;<br>
|
||||
if ( new_val > 63) new_val = 63 ; /* Important ! */<br>
|
||||
green[i] = new_val ; /* Pour 0 <= i < 64) */</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction travaille sur le <u>format
|
||||
sp<73>cifique de la machine</u> ! Inutile donc de passer
|
||||
par les fonctions <a href="#RaTCConvert">RaTCConvert</a>
|
||||
et <a href="#RaTCInvConvert">RaTCInvConvert</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.03 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> rc : Pointeur sur
|
||||
une structure de type <a href="struct.htm#REMAP_COLORS">REMAP_COLORS</a>
|
||||
d<>finissant la table de red<65>finition des couleurs
|
||||
<20>l<EFBFBD>mentaires, le d<>but du buffer <20> modifier et le
|
||||
nombre de points</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Modifie la r<>partition actuelle des
|
||||
couleurs d'une suite de points en True Color 32 bits. Les
|
||||
champs red, green et blue de la structure <a
|
||||
href="struct.htm#REMAP_COLORS">REMAP_COLORS</a> doivent
|
||||
pointer sur des tableaux de 256 (256=2^8) <20>l<EFBFBD>ments,
|
||||
chaque <20>l<EFBFBD>ment du tableau devant d<>finir la valeur <20>
|
||||
substituer <20> l'indice de ce tableau, par exemple la
|
||||
formule:<br>
|
||||
red[i] = i ; (0 <= i < 256) ne change rien pour la
|
||||
table de la composante rouge (i sera remplac<61> par i).<br>
|
||||
Attention ! La nouvelle valeur substitu<74> doit appartenir
|
||||
<20> l'intervalle [0,255].<br>
|
||||
Exemple tout b<>te : baisser la luminosit<69> de 20% sur
|
||||
toutes les composantes:<br>
|
||||
new_val = (80 * i) / 100 ;<br>
|
||||
/* Notons que on retombe forc<72>ment dans la plage [0;255]
|
||||
...*/<br>
|
||||
red[i] = green[i] = blue[i] = new_val ; /* Pour 0 <= i
|
||||
< 256) */</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Cette fonction travaille sur le <u>format
|
||||
sp<73>cifique de la machine</u> ! Inutile donc de passer
|
||||
par les fonctions <a href="#RaTCConvert">RaTCConvert</a>
|
||||
et <a href="#RaTCInvConvert">RaTCInvConvert</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.03 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in : MFDB
|
||||
d<>crivant l'image dont on veut effectuer la rotation<br>
|
||||
<strong>[OUT]</strong>out : MFDB de destination<br>
|
||||
<strong>[IN]</strong> angle : angle en degr<67>s de la
|
||||
rotation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">Aucun</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Permet de connaitre la taille de l'image
|
||||
apr<70>s rotation en vue d'une allocation par exemple. tous
|
||||
les champs du MFDB out sont mis <20> jour SAUF fd_addr car
|
||||
l'image destination n'est pas allou<6F>e.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">G<EFBFBD>n<EFBFBD>ralement, cette fonction est
|
||||
appel<65>e avant la fonction suivante</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.03 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<p> </p>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="2" width="100%">
|
||||
<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>Param<EFBFBD>tres</strong></td>
|
||||
<td width="85%"><strong>[IN]</strong> in : MFDB
|
||||
d<>crivant l'image dont on veut effectuer la rotation<br>
|
||||
<strong>[OUT]</strong>out : MFDB de destination<br>
|
||||
<strong>[IN]</strong> angle : angle en degr<67>s de la
|
||||
rotation<br>
|
||||
<strong>[IN]</strong> flags : drapeau dont les bits ont
|
||||
la signification suivante:<br>
|
||||
Bit 0 positionn<6E> : Demande <20> <a href="index.htm">VAPI</a>
|
||||
d'afficher une barre de progression</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Retour</strong></td>
|
||||
<td width="85%">ELDV_NOERROR : tout va bien<br>
|
||||
ELDV_NOTENOUGHMEMORY : pas assez de m<>moire<br>
|
||||
ELDV_CANCELLED : (possible seulement si la progression a
|
||||
<20>t<EFBFBD> demand<6E>e)<br>
|
||||
ELDV_GENERALFAILURE : erreur inconnue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Description</strong></td>
|
||||
<td width="85%">Efectue la rotation d'angle sp<73>cifi<66> su
|
||||
le MFDB source. Le MFDB destination doit avoir <20>t<EFBFBD>
|
||||
allou<6F>, sinon la fonction l'allouera. Notez que cette
|
||||
derni<6E>re solution est un peu dangereuse car c'est
|
||||
maintenant au LDV de g<>rer sa lib<69>ration par <a
|
||||
href="#RaRasterFree">RaRasterFree</a>.<br>
|
||||
La bonne nouvelle c'est que <a href="index.htm">VAPI</a>
|
||||
se charge de prendre en compte le format VDI standard si
|
||||
n<>cessaire !</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Remarques</strong></td>
|
||||
<td width="85%">Si l'angle est multiple de 90<39>, des
|
||||
routines sp<73>ciales sont appel<65>es afin d'<27>viter des
|
||||
calculs approximatifs et inutiles de sinus et cosinus.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%"><strong>Version VAPI</strong></td>
|
||||
<td width="85%">1.03 ou sup<75>rieure</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
|
||||
<hr>
|
||||
<div align="center"><center>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="center" width="17%"><a href="pr.htm"><img
|
||||
src="../images/cprev.jpg" alt="Chapitre pr<70>c<EFBFBD>dent"
|
||||
border="0" hspace="2" width="46" height="26"></a><a
|
||||
href="index.htm"><img src="../images/csom.jpg"
|
||||
alt="Retour au sommaire" border="0" hspace="2" width="26"
|
||||
height="26"></a><a href="co.htm"><img
|
||||
src="../images/csuiv.jpg" alt="Chapitre suivant"
|
||||
border="0" hspace="2" width="43" height="26"></a></td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="../images/icoprinc.gif"
|
||||
width="59" height="71"></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font color="#0000FF"
|
||||
size="5"><strong>Documentation </strong><em><strong>VISION
|
||||
(VAPI)</strong></em></font></p>
|
||||
</td>
|
||||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||||
align="center"><img src="../images/icointro.gif"
|
||||
width="59" height="71"></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"><p align="left">Derni<EFBFBD>re
|
||||
mise <20> jour : <!--webbot bot="Timestamp" startspan
|
||||
s-type="EDITED" s-format="%d/%m/%y" -->04/01/02<!--webbot
|
||||
bot="Timestamp" i-checksum="12484" endspan --></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%"><p align="center"><a
|
||||
href="..\..\..\download/dvldv.zip">T<EFBFBD>l<EFBFBD>charger la doc</a></p>
|
||||
</td>
|
||||
<td width="33%"><p align="center"><font size="4"><strong>RASTER
|
||||
INTERFACE</strong></font></p>
|
||||
</td>
|
||||
<td valign="top" width="17%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</center></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user