/*************************************************************************************************************************************/ /* */ /* G E N E R A T I O N D ' U N E S P I R A L E C A R R E E : */ /* */ /* */ /* Definition : */ /* */ /* Cette commande genere une image */ /* dont le nom est l'argument d'appel, */ /* et qui contient une spirale carree */ /* de centre (X_CENTRE,Y_CENTRE). */ /* */ /* */ /* Author of '$xci/spirale.01$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 1987??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 X_CENTRE \ Xcentre #define Y_CENTRE \ Ycentre #define Z_CENTRE \ Zorigine /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 S P I R A L E C A R R E E : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE)); DEFV(Float,INIT(numero_de_tour,FLOT__UNDEF)); /* Numero du tour courant... */ /*..............................................................................................................................*/ GET_ARGUMENTSg(nombre_d_arguments ,BLOC(GET_ARGUMENT_L("SX_SY_SZ_____compatibilite_20070416=""compatibilite_20070416=" ,SX_SY_SZ_____compatibilite_20070416 ); /* Parametre introduit le 20070416160630... */ GET_ARGUMENT_C("imageR=""R=",nom_imageR); ) ); SK(INTER_POINT); /* Choix des echelles... */ SX(INTER_POINT); SY(INTER_POINT); SZ(INTER_POINT); SET_CURSOR(_____cNORMALISE_OX(X_CENTRE),_____cNORMALISE_OY(Y_CENTRE),_____cNORMALISE_OZ(Z_CENTRE)); CALS(FgERASE()); DoIn(numero_de_tour,ZERO,MOIT(MOYE(dimX,dimY)),I) Bblock SET_COULEURS(NOIR,MIN2(NIVA(INTE(numero_de_tour)),BLANC)); CALS(FgMIX());CALS(FgMIY()); SX(INTER_POINT);SY(INTER_POINT); g3;g4; /* On se deplace en diagonale vers le bas-gauche... */ CALS(FgMOY());CALS(FgMOX()); gA; g1;g1;gB; g2;g2;gB; g3;g3;gB; g4;g4;gB; /* On trace le carre... */ CALS(FgXADDI()); CALS(FgYADDI()); /* Et on change d'echelle... */ Eblock EDoI CALi(Iupdate_image(nom_imageR,ImageG)); RETU_Commande; Eblock ECommande