Files
FireBee_Setup/tools/vision/ldv/doc/struct.htm
2022-11-25 03:00:01 +01:00

497 lines
19 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 (LDV) : Structures</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="defines.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="kitdev.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
(LDV)</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" -->16/05/01<!--webbot
bot="Timestamp" i-checksum="12425" 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>5.
S T R U C T U R E S</strong></font></p>
</td>
<td align="center" width="17%">&nbsp; <!--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>
<p>.<a name="LDV_INFOS"></a><font size="4"><strong>5.1 LDV_INFOS</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
short StrSize ;
short Type ;
char Authors[1+45] ;
LDV_CAPS Caps[10] ;
char RFU[16] ;
}
LDV_INFOS ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">StrSize</td>
<td align="center" width="15%">short</td>
<td width="75%">Taille de la structure LDV_INFOS. Doit
être initialisé à sizeof(LDV_INFOS). Le but de ce
champ est de permettre à <em><strong>VISION</strong></em>
de ne pas exploser ses données internes si la taille de
cette structure est amenée à changer.</td>
</tr>
<tr>
<td align="center" width="10%">Type</td>
<td align="center" width="15%">short</td>
<td width="75%">Doit valoir <a href="defines.htm#TLDV">TLDV_MODIFYIMG</a>,
<a href="defines.htm#TLDV">TLDV_LOADIMG</a> ou <a
href="defines.htm#TLDV">TLDV_SAVEIMG</a>, voire plus à
venir. Actuellement, seul le type <a
href="defines.htm#TLDV">TLDV_MODIFYIMG</a> est accepté
par <em><strong>VISION</strong></em></td>
</tr>
<tr>
<td align="center" width="10%">Authors</td>
<td align="center" width="15%">char[1+45]</td>
<td width="75%">Noms du ou des auteurs. 45 caractères
sont disponibles à cet effet.</td>
</tr>
<tr>
<td align="center" width="10%">Caps</td>
<td align="center" width="15%"><a href="#LDV_CAPS">LDV_CAPS</a>[10]</td>
<td width="75%">Tableau décrivant les capacités du LDV
pour chaque nombre de plans. Au maximum le LDV peut
gérer 9 nombres de plans différents car le tableau de
structures doit se terminer par une struture avec des
champs initialisés à zéro.</td>
</tr>
<tr>
<td align="center" width="10%">RFU</td>
<td align="center" width="15%">char[16]</td>
<td width="75%">Pour usage futur. Ne pas toucher !</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_CAPS"></a><font size="4"><strong>5.2 LDV_CAPS</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
char NbPlanes ;
char NbPlanesOut ;
unsigned long Flags ;
}
LDV_CAPS ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">NbPlanes</td>
<td align="center" width="15%">char</td>
<td width="75%">Nombre de plans pour cette capacité (1,
2, 4, 8 , 16, 24 (non géré), 32)</td>
</tr>
<tr>
<td align="center" width="10%">NbPlanesOut</td>
<td align="center" width="15%">char</td>
<td width="75%">Nombre de plans en sortie pour cette
capacité. Pour un LDV de type <a href="defines.htm#TLDV">TLDV_MODIFYIMG</a>,
ce champ doit égaler NbPlanes</td>
</tr>
<tr>
<td align="center" width="10%">Flags</td>
<td align="center" width="15%">unsigned long</td>
<td width="75%">Combinaison (symbole |) des masques
suivants:<ul>
<li><a href="defines.htm#LDVF">LDVF_STDFORMAT</a> :
le LDV accepte le format standard</li>
<li><a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a> :
le LDV accepte le format ATARI</li>
<li><a href="defines.htm#LDVF">LDVF_SPECFORMAT</a> :
le LDV accepte le format spécifique de la carte
graphique</li>
<li><a href="defines.htm#LDVF">LDVF_SUPPORTPREVIEW</a>
: le LDV fournit la fonction Preview (fortement
conseillé même si elle ne fait qu'appeller Run)</li>
<li><a href="defines.htm#LDVF">LDVF_AFFECTPALETTE</a>
: le LDV modifie la palette (NbPlanes doit être
inférieur ou égal à 8)</li>
<li><a href="defines.htm#LDVF">LDVF_SUPPORTPROG</a> :
le LDV appellera la fonction <a
href="vapi/pr.htm#PrSetProg">PrSetProg</a> de
l'interface <a
href="vapi/index.htm#Présentation">VAPI</a>
(conseillé si le traitement dure plus de 2
secondes)</li>
<li><a href="defines.htm#LDVF">LDVF_OPINPLACE</a> :
le LDV sait travailler sur l'image source, sans
que <em><strong>VISION</strong></em> alloue la
destination (on dit que la transformation se fait
sur place). En ce cas, le paramètre out de la
fonction Run est le même que in. Dans la mesure
du possible, utilisez ce flag, cela économise de
la mémoire.</li>
<li><a href="defines.htm#LDVF">LDVF_REALTIMEPARAMS</a>
: le LDV effectue assez rapidement la fonction
Preview (image petite affichée par la boite de
dialogue de <em><strong>VISION</strong></em>),
pour que la modification des paramètres du LDV
par les ascenseurs soit suffisamment fluide (au
moins 1 image par seconde)</li>
<li><a href="defines.htm#LDVF">LDVF_SUPPORTCANCEL</a>
: la fonction <a href="descrip.htm#run">Run</a>
peut être annulée par l'utilisateur (à
utiliser conjointement avec la fonction <a
href="vapi/pr.htm#PrSetProgEx">PrSetProgEx</a> de
l'interface <a href="vapi/pr.htm">Progress</a> de
<a href="vapi/index.htm">VAPI</a>)</li>
</ul>
</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_IMAGE"></a><font size="4"><strong>5.3 LDV_IMAGE</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
short RasterFormat ;
MFDB Raster ;
LDV_PALETTE Palette ; /* Structure fournie si Raster.fd_nplanes &lt;= 8 */
}
LDV_IMAGE ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">RasterFormat</td>
<td align="center" width="15%">short</td>
<td width="75%"><a href="defines.htm#LDVF">LDVF_STDFORMAT</a>,
<a href="defines.htm#LDVF">LDVF_ATARIFORMAT</a> ou <a
href="defines.htm#LDVF">LDVF_SPECFORMAT</a></td>
</tr>
<tr>
<td align="center" width="10%">Raster</td>
<td align="center" width="15%">MFDB</td>
<td width="75%">Le MFDB classique ATARI décrivant les
données de l'image (hors palette)</td>
</tr>
<tr>
<td align="center" width="10%">Palette</td>
<td align="center" width="15%"><a href="#LDV_PALETTE">LDV_PALETTE</a></td>
<td width="75%">Pointeur sur une structure <a
href="#LDV_PALETTE">LDV_PALETTE</a> décrivant la palette
assoicée à l'image si le nombre de bits est inférieur
ou égal à 8.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_PALETTE"></a><font size="4"><strong>5.4
LDV_PALETTE</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
short NbColors ;
VDI_ELEMENTPAL* Pal ;
}
LDV_PALETTE ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">NbColors</td>
<td align="center" width="15%">short</td>
<td width="75%">Le nombre d'éléments dans le tableau
pointé par Palette (soit 2, 4, 16 ou 256 couleurs)</td>
</tr>
<tr>
<td align="center" width="10%">Pal</td>
<td align="center" width="15%"><a
href="#LDV_VDIELEMENTALPAL">VDI_ELEMENTALPAL</a> *</td>
<td width="75%">Pointeur sur un tableau de NbColors
éléments de type VDI_ELEMENTPAL. La palette proposée
est indexée sur les indices VDI (ceux utilisés par les
fonctions VDI comme le tracé d'une ligne) et non TOS
(ceux que vous récupérerez par les fonctions raster de <a
href="vapi/index.htm#Présentation">VAPI</a>).
Heureusement, <a href="vapi/index.htm#Présentation">VAPI</a>
propose des fonctions pour transformer les indices VDI en
indices TOS et vice-versa.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_VDIELEMENTALPAL"></a><font size="4"><strong>5.5
VDI_ELEMENTALPAL</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
short Red ;
short Green ;
short Blue ;
}
VDI_ELEMENTPAL ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">Red</td>
<td align="center" width="15%">short</td>
<td width="75%">Composante <font color="#FF0000">Rouge</font>
de l'index VDI de la palette (0 &lt;= index &lt;= 1000)</td>
</tr>
<tr>
<td align="center">Green</td>
<td align="center">short</td>
<td>Composante <font color="#00FF00">Verte</font> de
l'index VDI de la palette (0 &lt;= index &lt;= 1000)</td>
</tr>
<tr>
<td align="center">Blue</td>
<td align="center">short</td>
<td>Composante <font color="#0000FF">Bleue</font> de
l'index VDI de la palette (0 &lt;= index &lt;= 1000)</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_PARAMS"></a><font size="4"><strong>5.6 LDV_PARAMS</strong></font></p>
<pre><font size="4"><strong>typedef struct
{
short x1, y1, x2, y2 ;
short NbParams ;
LDV_BASICPARAM Param[LDVNBMAX_PARAMETERS] ;
void* UserParam ;
}
LDV_PARAMS ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">x1</td>
<td align="center" width="15%">short</td>
<td width="75%">Position X du bord haut-gauche du
rectangle à traiter (0 si image entière)</td>
</tr>
<tr>
<td align="center">y1</td>
<td align="center">short</td>
<td>Position Y du bord haut-gauche du rectangle à
traiter (0 si image entière)</td>
</tr>
<tr>
<td align="center">x2</td>
<td align="center">short</td>
<td>Position X du bord bas-droit du rectangle à traiter
(largeur image - 1 si image entière)</td>
</tr>
<tr>
<td align="center">y2</td>
<td align="center">short</td>
<td>Position Y du bord bas-droit du rectangle à traiter
(hauteur image - 1 si image entière)</td>
</tr>
<tr>
<td align="center">NbParams</td>
<td align="center">short</td>
<td>Nombre de paramètres valides dans le tableau Param</td>
</tr>
<tr>
<td align="center">Param</td>
<td align="center"><a href="#LDV_BASICPARAM">LDV_BASICPARAM</a></td>
<td>Tableau contenant les paramètres saisis depuis
l'interface de <em><strong>VISION</strong></em></td>
</tr>
<tr>
<td align="center">UserParam</td>
<td align="center">void *</td>
<td>Si votre LDV a besoin de stocker des données
supplémentaires lors d'un appel à <a
href="descrip.htm#getparams">GetParams</a>, ce pointeur
peut être utilisé pour ça. Par exemple si votre LDV
prend en pararmètre un tableau de matrice 4x4, c'est
clair que la structure &quot;de base&quot; LDV_PARAMS ne
peut convenir. Il vous suffit alors de faire pointer
UserParam sur votre matrice lors de l'appel à <a
href="descrip.htm#getparams">GetParams</a>, vous
retrouverez cette même valeur lorsque <em><strong>VISION</strong></em>
appellera la fonction <a href="descrip.htm#run">Run</a>.
Vous pouvez même décider d'allouer dynamiquement la
structure qui vous convient lors de l'appel à <a
href="descrip.htm#getparams">GetParams</a>, puis de
l'utiliser (et de la libérer...) lors de l'appel à <a
href="descrip.htm#run">Run</a>.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<p><a name="LDV_BASICPARAM"></a><font size="4"><strong>5.7
LDV_BASICPARAM (UNION)</strong></font></p>
<pre><font size="4"><strong>typedef union
{
short s ;
float f ;
}
LDV_BASICPARAM ;</strong></font></pre>
<div align="center"><center>
<table border="2" width="100%">
<tr>
<td align="center" width="10%"><strong>Champ</strong></td>
<td align="center" width="15%"><strong>Type</strong></td>
<td align="center" width="75%"><strong>Remarques</strong></td>
</tr>
<tr>
<td align="center" width="10%">s</td>
<td align="center" width="15%">short</td>
<td width="75%">Valeur du paramètre (si ce paramètre,
défini dans le <a href="descrip.htm#fichier ini">.INI
associé</a> est de type entier)</td>
</tr>
<tr>
<td align="center">f</td>
<td align="center">float</td>
<td>Valeur du paramètre (si ce paramètre, défini dans
le <a href="descrip.htm#fichier ini">.INI associé</a>
est de type float). Actuellement le type float n'est pas
géré et étant donné que les compilateurs peuvent ne
pas coder les float suivant le même format, je vous
recommande fortement d'utiliser le type short.</td>
</tr>
</table>
</center></div>
<p>&nbsp;</p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" width="17%"><a href="defines.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="kitdev.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
(LDV)</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" -->16/05/01<!--webbot
bot="Timestamp" i-checksum="12425" 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>S
T R U C T U R E S</strong></font></p>
</td>
<td valign="top" width="17%">&nbsp; </td>
</tr>
</table>
</center></div>
</body>
</html>