Premier commit
[powerfractal.git] / Src / power_IO.ads
1 ------------------------------------------------------------------------------------------------
2 -- Nom : Power_IO / fait partie du programme Power Fractal --
3 -- --
4 -- Auteurs : Gregory Burri & Adrien Crivelli --
5 ------------------------------------------------------------------------------------------------
6 -- But : Outils Pour Rendre une fractal au format .bmp ou --
7 -- Enregistrer et charger au format .pof --
8 ------------------------------------------------------------------------------------------------
9
10 with Power_Types;
11 use type Power_Types.Cara_Fractal;
12
13 package Power_IO is
14
15 Erreur_Fichier : exception; -- Erreur propre au fichier (enregistrement et lecture)
16
17 ------------------------------------------------------------------------------------------------
18 -- Nom : Enregistrer_Fractal --
19 -- But : Enregistrer les caracteristiques d'un fractal dans un fichier --
20 -- --
21 -- Parametres ----------------------------------------------------------------------------------
22 -- In : * Le nom du fichier : Nom_Fichier --
23 -- * Les caracteristiques de la fractal : Fractal --
24 -- --
25 ------------------------------------------------------------------------------------------------
26 procedure Enregistrer_Fractal (Nom_Fichier : String; Fractal : Power_Types.Cara_Fractal);
27
28 ------------------------------------------------------------------------------------------------
29 -- Nom : Charger_Fractal --
30 -- But : Charger les caracteristiques d'un fractal depuis un fichier --
31 -- --
32 -- Parametres ----------------------------------------------------------------------------------
33 -- In : * Le nom du fichier --
34 -- --
35 -- return : * Les caracteristiques de la fractal --
36 -- --
37 ------------------------------------------------------------------------------------------------
38 function Charger_Fractal (Nom_Fichier : String) return Power_Types.Cara_Fractal;
39
40
41 ------------------------------------------------------------------------------------------------
42 -- Nom : Enregistrer_Liste --
43 -- But : Enregistrer une liste contenant des fractals --
44 -- --
45 -- Parametres ----------------------------------------------------------------------------------
46 -- In : * Le nom du fichier : Nom_Fichier --
47 -- * La liste de fractals : Liste --
48 -- --
49 ------------------------------------------------------------------------------------------------
50 procedure Enregistrer_Liste (Nom_Fichier : String; Liste : Power_Types.T_Liste_Fractals);
51
52 ------------------------------------------------------------------------------------------------
53 -- Nom : Charger_List --
54 -- But : Charger toutes les fractals contenues dans un fichier --
55 -- --
56 -- Parametres ----------------------------------------------------------------------------------
57 -- In : * Le nom du fichier --
58 -- --
59 -- In out : * La liste de fractals --
60 -- --
61 ------------------------------------------------------------------------------------------------
62 procedure Charger_Liste (Nom_Fichier : String; Liste : in out Power_Types.T_Liste_Fractals);
63
64
65 ------------------------------------------------------------------------------------------------
66 -- Nom : Rendre_Bmp --
67 -- But : Rendre un fichier image au format bmp (a l'aide de la library BMPLib) --
68 -- --
69 -- Parametres ----------------------------------------------------------------------------------
70 -- In : * Les dimensions du bmp : Largeur_Zone et Hauteur_Zone --
71 -- * La fractal a rendre : Cara_Fractal --
72 -- * Le nom du fichier bmp : Nom_Fichier --
73 -- --
74 ------------------------------------------------------------------------------------------------
75 procedure Rendre_Bmp (Fractal : Power_Types.Cara_Fractal;
76 Nom_Fichier : String; Largeur_Zone : Natural := 1024; Hauteur_Zone : Natural := 768);
77
78
79 end Power_IO;