901 lines
34 KiB
HTML
901 lines
34 KiB
HTML
<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écé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ère
|
|
mise à 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élé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ésumé</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Pré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érents formats
|
|
(bit-plan, True Color, formats ATARI, spé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ètres</strong></td>
|
|
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
|
sur l'image à 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é avec des bits mis à 0 (index TOS/VDI =
|
|
0), l'indice 0 de la palette est généralement
|
|
positionné 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é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è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é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és (la composante verte est alors codé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é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é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ètres</strong></td>
|
|
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
|
sur l'image à 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é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écifique de la machine
|
|
est le format ATARI, la fonction rend immé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é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ètres</strong></td>
|
|
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
|
sur l'image à 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é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écifique de la machine
|
|
est le format ATARI, la fonction rend immé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é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ètres</strong></td>
|
|
<td width="85%"><strong>[IN/OUT]</strong> img : pointeur
|
|
sur l'image à traiter<br>
|
|
<strong>[IN] </strong>width : largeur (en pixels)
|
|
maximale à ne pas dépasser. width ne peut dépasser
|
|
32767. Le codage sur un entier 32 bits ne sert qu'à
|
|
assurer la compatibilité 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épare des opé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ètre width peut paraître
|
|
redondant avec img->fd_w mais il est là parce que <em><strong>VISION</strong></em>
|
|
positionne toujours img->fd_w à un multiple de 16
|
|
(optimisations internes). width permet donc de ne pas
|
|
être limité à une largeur multiple de 16 pixels.<br>
|
|
<u>Inté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é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ètres</strong></td>
|
|
<td width="85%"><strong>[IN]</strong> indexes : pointeur
|
|
sur le tableau d'indices TOS à converir vers le raster
|
|
précédemment initialisé avec la fonction <a
|
|
href="#RaInd2RasterInit">RaInd2RasterInit</a><br>
|
|
<strong>[IN] </strong>nb_indexes : Nombre d'index dans le
|
|
tableau pointé 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é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ées (indices
|
|
TOS) vers le raster image. VAPI mémorise la derniè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é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ètres</strong></td>
|
|
<td width="85%"><strong>[IN]</strong> pt_bitplan :
|
|
pointeur sur le début des données raster à convertir
|
|
(démarrage sur un multiple de 16 pixels)<br>
|
|
<strong>[IN] </strong>nb_pts : Nombre de points à
|
|
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'à assurer la compatibilité avec les compilateurs 32
|
|
bits.<br>
|
|
<strong>[OUT] </strong>tos_indexes : pointeur vers le
|
|
tableau d'indices TOS recevant les données (doit être
|
|
dimensionné à 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é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 être multiple de 16, sinon vous n'aurez pas les
|
|
derneiers points (si vous spé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 être
|
|
tranquille...</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Version VAPI</strong></td>
|
|
<td width="85%">1.00 ou supé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è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'à
|
|
assurer la compatibilité 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écupérer le tableau de correspondance
|
|
entre les indices TOS et VDI, pour un nombre de plans
|
|
donné</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é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è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'à
|
|
assurer la compatibilité 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écupérer le tableau de correspondance
|
|
entre les indices VDI et TOS, pour un nombre de plans
|
|
donné</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é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è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'à assurer la
|
|
compatibilité 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é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è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 été allouée (pointé
|
|
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è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ès le champ fd_addr pointe vers
|
|
les données image (non initialisées), sinon fd_addr
|
|
vaut NULL<br>
|
|
fd_wdwidth est aussi mis à jour. Les autres champs
|
|
restent inchangés.</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Version VAPI</strong></td>
|
|
<td width="85%">1.02 ou supé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è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ère une image précédemment alloué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 à zéro après libération.</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Version VAPI</strong></td>
|
|
<td width="85%">1.02 ou supé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è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éfinition des couleurs
|
|
élémentaires, le début du buffer à 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) éléments,
|
|
chaque élément du tableau devant définir la valeur à
|
|
substituer à 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é par i).<br>
|
|
Attention ! La nouvelle valeur substitué doit appartenir
|
|
à l'intervalle [0,31].<br>
|
|
Exemple tout bête : augmenter la luminosité 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é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é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è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éfinition des couleurs
|
|
élémentaires, le début du buffer à 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) éléments pour
|
|
red et blue, et 64 (64=2^6) pour green, chaque élément
|
|
du tableau devant définir la valeur à substituer à
|
|
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é par i).<br>
|
|
Attention ! La nouvelle valeur substitué doit appartenir
|
|
à l'intervalle [0,31] pour red et blue et [0,63] pour
|
|
green.<br>
|
|
Exemple tout bête : augmenter la luminosité 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é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é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è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éfinition des couleurs
|
|
élémentaires, le début du buffer à 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) éléments,
|
|
chaque élément du tableau devant définir la valeur à
|
|
substituer à 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é par i).<br>
|
|
Attention ! La nouvelle valeur substitué doit appartenir
|
|
à l'intervalle [0,255].<br>
|
|
Exemple tout bête : baisser la luminosité de 20% sur
|
|
toutes les composantes:<br>
|
|
new_val = (80 * i) / 100 ;<br>
|
|
/* Notons que on retombe forcé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é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é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è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é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ès rotation en vue d'une allocation par exemple. tous
|
|
les champs du MFDB out sont mis à jour SAUF fd_addr car
|
|
l'image destination n'est pas allouée.</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Remarques</strong></td>
|
|
<td width="85%">Généralement, cette fonction est
|
|
appelée avant la fonction suivante</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%"><strong>Version VAPI</strong></td>
|
|
<td width="85%">1.03 ou supé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è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és de la
|
|
rotation<br>
|
|
<strong>[IN]</strong> flags : drapeau dont les bits ont
|
|
la signification suivante:<br>
|
|
Bit 0 positionné : Demande à <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
|
|
été demandé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écifié su
|
|
le MFDB source. Le MFDB destination doit avoir été
|
|
alloué, sinon la fonction l'allouera. Notez que cette
|
|
dernière solution est un peu dangereuse car c'est
|
|
maintenant au LDV de gérer sa libé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°, des
|
|
routines spéciales sont appelées afin d'é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é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écé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ère
|
|
mise à 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élé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>
|