------------------------------------------------------------------------------------------------ -- Nom : Power_IO / fait partie du programme Power Fractal -- -- -- -- Auteurs : Gregory Burri & Adrien Crivelli -- ------------------------------------------------------------------------------------------------ -- But : Outils Pour Rendre une fractal au format .bmp ou -- -- Enregistrer et charger au format .pof -- ------------------------------------------------------------------------------------------------ with Power_Types; use type Power_Types.Cara_Fractal; package Power_IO is Erreur_Fichier : exception; -- Erreur propre au fichier (enregistrement et lecture) ------------------------------------------------------------------------------------------------ -- Nom : Enregistrer_Fractal -- -- But : Enregistrer les caracteristiques d'un fractal dans un fichier -- -- -- -- Parametres ---------------------------------------------------------------------------------- -- In : * Le nom du fichier : Nom_Fichier -- -- * Les caracteristiques de la fractal : Fractal -- -- -- ------------------------------------------------------------------------------------------------ procedure Enregistrer_Fractal (Nom_Fichier : String; Fractal : Power_Types.Cara_Fractal); ------------------------------------------------------------------------------------------------ -- Nom : Charger_Fractal -- -- But : Charger les caracteristiques d'un fractal depuis un fichier -- -- -- -- Parametres ---------------------------------------------------------------------------------- -- In : * Le nom du fichier -- -- -- -- return : * Les caracteristiques de la fractal -- -- -- ------------------------------------------------------------------------------------------------ function Charger_Fractal (Nom_Fichier : String) return Power_Types.Cara_Fractal; ------------------------------------------------------------------------------------------------ -- Nom : Enregistrer_Liste -- -- But : Enregistrer une liste contenant des fractals -- -- -- -- Parametres ---------------------------------------------------------------------------------- -- In : * Le nom du fichier : Nom_Fichier -- -- * La liste de fractals : Liste -- -- -- ------------------------------------------------------------------------------------------------ procedure Enregistrer_Liste (Nom_Fichier : String; Liste : Power_Types.T_Liste_Fractals); ------------------------------------------------------------------------------------------------ -- Nom : Charger_List -- -- But : Charger toutes les fractals contenues dans un fichier -- -- -- -- Parametres ---------------------------------------------------------------------------------- -- In : * Le nom du fichier -- -- -- -- In out : * La liste de fractals -- -- -- ------------------------------------------------------------------------------------------------ procedure Charger_Liste (Nom_Fichier : String; Liste : in out Power_Types.T_Liste_Fractals); ------------------------------------------------------------------------------------------------ -- Nom : Rendre_Bmp -- -- But : Rendre un fichier image au format bmp (a l'aide de la library BMPLib) -- -- -- -- Parametres ---------------------------------------------------------------------------------- -- In : * Les dimensions du bmp : Largeur_Zone et Hauteur_Zone -- -- * La fractal a rendre : Cara_Fractal -- -- * Le nom du fichier bmp : Nom_Fichier -- -- -- ------------------------------------------------------------------------------------------------ procedure Rendre_Bmp (Fractal : Power_Types.Cara_Fractal; Nom_Fichier : String; Largeur_Zone : Natural := 1024; Hauteur_Zone : Natural := 768); end Power_IO;