/*************************************************************************************************************************************/ /* */ /* E D I T I O N D ' U N P O I N T D ' U N E I M A G E : */ /* */ /* */ /* Author of '$xci/print$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 1993??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 ABSCISSE \ Xmin #define ORDONNEE \ Ymin /* Donne les coordonnees du point implicite... */ #define EDITER_L_ABSCISSE \ VRAI #define EDITER_L_ORDONNEE \ VRAI /* Pour controler l'edition des coordonnees (introduit le 20081123093312. */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* E D I T I O N D ' U N P O I N T D ' U N E I M A G E : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE)); DEFV(pointI_2D,point); /* Donne les coordonnees du point argument... */ DEFV(Logical,INIT(editer_l_abscisse,EDITER_L_ABSCISSE)); DEFV(Logical,INIT(editer_l_ordonnee,EDITER_L_ORDONNEE)); /* Pour controler l'edition des coordonnees (introduit le 20081123093312. */ /*..............................................................................................................................*/ INITIALISATION_POINT_2D(point,ABSCISSE,ORDONNEE); /* Donne les coordonnees du point implicite... */ GET_ARGUMENTSi(nombre_d_arguments ,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_imageA); GET_ARGUMENT_I("x=""X=",ASD1(point,x)); GET_ARGUMENT_I("y=""Y=",ASD1(point,y)); GET_ARGUMENT_L("editerX=""eX=""ex=",editer_l_abscisse); GET_ARGUMENT_L("editerY=""eY=""ey=",editer_l_ordonnee); ) ); Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageA,nom_imageA)))) Bblock Test(TEST_DANS_L_IMAGE(ASD1(point,x),ASD1(point,y))) Bblock CAL3(Prme1("%d ",load_point(ImageA,ASD1(point,x),ASD1(point,y)))); Test(IL_FAUT(editer_l_abscisse)) Bblock CAL3(Prme1("%.^^^ ",_____cNORMALISE_OX(ASD1(point,x)))); /* Le 20091123123256, le format "^^g" est passe a "^^^" pour plus de souplesse... */ Eblock ATes Bblock Eblock ETes Test(IL_FAUT(editer_l_ordonnee)) Bblock CAL3(Prme1("%.^^^ ",_____cNORMALISE_OY(ASD1(point,y)))); /* Le 20091123123256, le format "^^g" est passe a "^^^" pour plus de souplesse... */ Eblock ATes Bblock Eblock ETes /* Edition des resultats sous la forme d'une liste de 3 elements : */ /* "niveau X Y" que l'on peut donc recuperer en tant que liste du Cshell... */ /* */ /* Le 20060105155308, le format "16g" est passe a "^^g" pour plus de souplesse... */ Eblock ATes Bblock PRINT_ERREUR("le point demande est en dehors de l'image"); Eblock ETes Eblock ATes Bblock Test__CODE_ERREUR__ERREUR07; Eblock ETes RETU_Commande; Eblock ECommande