/*************************************************************************************************************************************/
/* */
/* G E N E R A T I O N D ' U N E C R O I X C E N T R E E : */
/* */
/* */
/* Definition : */
/* */
/* Cette commande genere une image */
/* dont le nom est l'argument d'appel, */
/* et qui contient une croix centree. */
/* */
/* */
/* Author of '$xci/croix.01$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 1994??????????). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R F A C E ' listG ' : */
/* */
/* */
/* :Debut_listG: */
/* :Fin_listG: */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* F I C H I E R S D ' I N C L U D E S : */
/* */
/*************************************************************************************************************************************/
#include INCLUDES_BASE
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P A R A M E T R E S : */
/* */
/*************************************************************************************************************************************/
#define NUMERO_DE_COULEUR \
BLANC \
/* Couleur du trace. */
#define DEFINITION_DES_POINTILLES \
PAS_DE_POINTILLES \
/* "Pattern" des pointilles. */
#define EDITER_LE_NIVEAU_DU_POINT \
FAUX \
/* Faut-il editer le niveau du point central de la croix (introduit le 20210424173747) ? */ \
/* La valeur par defaut garantit la compatibilite anterieure... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* G E N E R A T I O N D ' U N E C R O I X C E N T R E E : */
/* */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));
DEFV(Int,INIT(Xcroix,UNDEF));
DEFV(Int,INIT(Ycroix,UNDEF));
/* Coordonnees de la croix lorsqu'elle n'est pas centree (introduites le 20081002102021). */
/* On notera que les valeurs par defaut ne dependent pas de '$formatI' et peuvent donc etre */
/* definies avant le 'GET_ARGUMENTSg(...)'. Le 20081013103330, 'GIT_ARGUMENT_I(...)' fut */
/* utilise permettant de passer de {k___Xmin,k___Ymin} a {Xcentre,Ycentre} implicitement. */
/* Cela demande un changement dans les valeurs initiales en passant de {k___Xmin,k___Ymin} */
/* a {UNDEF,UNDEF} explicitement... */
DEFV(genere_p,INIT(numero_de_couleur,NUMERO_DE_COULEUR));
/* Numero de la couleur courante... */
DEFV(binaire,INIT(definition_des_pointilles,DEFINITION_DES_POINTILLES));
/* "Pattern" des pointilles. */
DEFV(Logical,INIT(editer_le_niveau_du_point,EDITER_LE_NIVEAU_DU_POINT));
/* Faut-il editer le niveau du point central de la croix (introduit le 20210424173747) ? */
/* La valeur par defaut garantit la compatibilite anterieure... */
/*..............................................................................................................................*/
GET_ARGUMENTSg(nombre_d_arguments
,BLOC(GET_ARGUMENT_L("SX_SY_SZ_____compatibilite_20070416=""compatibilite_20070416="
,SX_SY_SZ_____compatibilite_20070416
);
/* Parametre introduit le 20070416155857... */
GET_ARGUMENT_C("imageA=""A=",nom_imageA);
GET_ARGUMENT_C("imageR=""R=",nom_imageR);
GIT_ARGUMENT_I("X=""x=",Xcroix,Xcentre);
GIT_ARGUMENT_I("Y=""y=",Ycroix,Ycentre);
GET_ARGUMENT_P("couleur=""c=",numero_de_couleur);
GET_ARGUMENT_I("pointilles=""p=",definition_des_pointilles);
GET_ARGUMENT_L("editer_niveau=""editer=""en=",editer_le_niveau_du_point);
/* Parametre introduit le 20210424173747... */
)
);
CALi(FgERASE());
Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageG,nom_imageA))))
Bblock
Test(IL_FAUT(editer_le_niveau_du_point))
/* Test introduit le 20210424173747... */
Bblock
CAL3(Prme3("niveau(%d,%d)=%d\n",Xcroix,Ycroix,load_point_valide(ImageG,Xcroix,Ycroix)));
Eblock
ATes
Bblock
Eblock
ETes
SK(INTER_POINT);
SX(INTER_POINT);
SY(INTER_POINT);
SZ(INTER_POINT);
SET_POINTILLES(definition_des_pointilles);
SET_COULEURS(NOIR,NOIR);
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymin),_____cNORMALISE_OZ(Zmin));
g1;gA;
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymax),_____cNORMALISE_OZ(Zmin));
g1;gB;
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymin),_____cNORMALISE_OZ(Zmin));
g3;gA;
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymax),_____cNORMALISE_OZ(Zmin));
g3;gB;
/* Trace de deux barres verticales NOIRes. */
SET_CURSOR(_____cNORMALISE_OX(Xmin),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
g2;gA;
SET_CURSOR(_____cNORMALISE_OX(Xmax),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
g2;gB;
SET_CURSOR(_____cNORMALISE_OX(Xmin),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
g4;gA;
SET_CURSOR(_____cNORMALISE_OX(Xmax),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
g4;gB;
/* Trace de deux barres horizontales NOIRes. */
SET_COULEURS(NOIR,numero_de_couleur);
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymin),_____cNORMALISE_OZ(Zmin));
gA;
SET_CURSOR(_____cNORMALISE_OX(Xcroix),_____cNORMALISE_OY(Ymax),_____cNORMALISE_OZ(Zmin));
gB;
/* Trace d'une barre verticale BLANChe. */
SET_CURSOR(_____cNORMALISE_OX(Xmin),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
gA;
SET_CURSOR(_____cNORMALISE_OX(Xmax),_____cNORMALISE_OY(Ycroix),_____cNORMALISE_OZ(Zmin));
gB;
/* Trace d'une barre horizontale BLANChe. */
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
CALi(Iupdate_image(nom_imageR,ImageG));
RETU_Commande;
Eblock
ECommande
Copyright © Jean-François COLONNA, 2019-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2019-2024.