- Main Page
- Data Structures
- Files

- File List

# graph.h

    00001 /*  Grafx2 - The Ultimate 256-color bitmap paint program
    00002
    00003     Copyright 2007-2008 Adrien Destugues
    00004     Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
    00005
    00006     Grafx2 is free software; you can redistribute it and/or
    00007     modify it under the terms of the GNU General Public License
    00008     as published by the Free Software Foundation; version 2
    00009     of the License.
    00010
    00011     Grafx2 is distributed in the hope that it will be useful,
    00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00014     GNU General Public License for more details.
    00015
    00016     You should have received a copy of the GNU General Public License
    00017     along with Grafx2; if not, see <http://www.gnu.org/licenses/> or
    00018     write to the Free Software Foundation, Inc.,
    00019     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    00020 */
    00021
    00022 void Liste2tables(word * Liste, short Pas, byte Mode, byte * Table_inc,
    00023         byte * Table_dec
    00024 );
    00025
    00026 void Transformer_point(short X, short Y,
    00027                        float cosA, float sinA, short * Xr, short * Yr);
    00028
    00029 int Initialiser_mode_video(int Largeur, int Hauteur, int Fullscreen);
    00030
    00031 byte Aucun_effet(word X,word Y,byte Couleur);
    00032 byte Effet_Shade(word X,word Y,byte Couleur);
    00033 byte Effet_Quick_shade(word X,word Y,byte Couleur);
    00034 byte Effet_Tiling(word X,word Y,byte Couleur);
    00035 byte Effet_Smooth(word X,word Y,byte Couleur);
    00036
    00037 void Afficher_foreback(void);
    00038
    00039
    00040 void Afficher_pixel(word X,word Y,byte Couleur);
    00041
    00042 void Afficher_pinceau(short X,short Y,byte Couleur,byte Preview);
    00043 void Effacer_pinceau(short X,short Y);
    00044
    00045 void Redimentionner_image(word Largeur_choisie,word Hauteur_choisie);
    00046
    00047 void Remplir(byte Couleur_de_remplissage);
    00048 void Remplacer(byte Nouvelle_couleur);
    00049
    00050 void Pixel_figure_Preview    (word Pos_X,word Pos_Y,byte Couleur);
    00051 void Pixel_figure_Preview_auto(word Pos_X,word Pos_Y);
    00052 void Pixel_figure_Preview_xor(word Pos_X,word Pos_Y,byte Couleur);
    00053 void Pixel_figure_Preview_xorback(word Pos_X,word Pos_Y,byte Couleur);
    00054 void Pixel_figure_Dans_brosse(word Pos_X,word Pos_Y,byte Couleur);
    00055
    00056 void Tracer_cercle_vide_Definitif(short Centre_X,short Centre_Y,short Rayon,byte Couleur);
    00057 void Tracer_cercle_vide_Preview  (short Centre_X,short Centre_Y,short Rayon,byte Couleur);
    00058 void Effacer_cercle_vide_Preview (short Centre_X,short Centre_Y,short Rayon);
    00059 void Tracer_cercle_plein         (short Centre_X,short Centre_Y,short Rayon,byte Couleur);
    00060
    00061 void Tracer_ellipse_vide_Definitif(short Centre_X,short Centre_Y,short Rayon_horizontal,short Rayon_vertical,byte Couleur);
    00062 void Tracer_ellipse_vide_Preview  (short Centre_X,short Centre_Y,short Rayon_horizontal,short Rayon_vertical,byte Couleur);
    00063 void Effacer_ellipse_vide_Preview (short Centre_X,short Centre_Y,short Rayon_horizontal,short Rayon_vertical);
    00064 void Tracer_ellipse_pleine        (short Centre_X,short Centre_Y,short Rayon_horizontal,short Rayon_vertical,byte Couleur);
    00065
    00066 void Rectifier_coordonnees_a_45_degres(short AX, short AY, short* BX, short* BY);
    00067 void Tracer_ligne_General(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y, byte Couleur);
    00068 void Tracer_ligne_Definitif  (short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00069 void Tracer_ligne_Preview    (short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00070 void Tracer_ligne_Preview_xor(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00071 void Tracer_ligne_Preview_xorback(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00072 void Effacer_ligne_Preview   (short Debut_X,short Debut_Y,short Fin_X,short Fin_Y);
    00073
    00074 void Tracer_rectangle_vide(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00075 void Tracer_rectangle_plein(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,byte Couleur);
    00076
    00077 void Tracer_courbe_Definitif(short X1, short Y1, short X2, short Y2, short X3, short Y3, short X4, short Y4, byte Couleur);
    00078 void Tracer_courbe_Preview  (short X1, short Y1, short X2, short Y2, short X3, short Y3, short X4, short Y4, byte Couleur);
    00079 void Effacer_courbe_Preview (short X1, short Y1, short X2, short Y2, short X3, short Y3, short X4, short Y4, byte Couleur);
    00080
    00081 void Aerographe(short Bouton_clicke);
    00082
    00083 void Degrade_de_base           (long Indice,short Pos_X,short Pos_Y);
    00084 void Degrade_de_trames_simples (long Indice,short Pos_X,short Pos_Y);
    00085 void Degrade_de_trames_etendues(long Indice,short Pos_X,short Pos_Y);
    00086 void Degrade_aleatoire         (long Indice,short Pos_X,short Pos_Y);
    00087
    00088 void Tracer_cercle_degrade  (short Centre_X,short Centre_Y,short Rayon,short Eclairage_X,short Eclairage_Y);
    00089 void Tracer_ellipse_degradee(short Centre_X,short Centre_Y,short Rayon_horizontal,short Rayon_vertical,short Eclairage_X,short Eclairage_Y);
    00090 void Tracer_rectangle_degrade(short RAX,short RAY,short RBX,short RBY,short VAX,short VAY, short VBX, short VBY);
    00091
    00092 void Polyfill_General(int Vertices, short * Points, int Color);
    00093 void Polyfill(int Vertices, short * Points, int Color);
    00094
    00095 // Gestion des backups:
    00096 void Download_infos_page_principal(S_Page * Page);
    00097 void Download_infos_page_brouillon(S_Page * Page);
    00098 void Download_infos_backup(S_Liste_de_pages * Liste);
    00099 void Detruire_les_listes_de_backups_en_fin_de_programme(void);
    00100 void Nouveau_nombre_de_backups(int Nouveau);
    00101 int  Backup_avec_nouvelles_dimensions(int Upload,int Largeur,int Hauteur);
    00102 int  Backuper_et_redimensionner_brouillon(int Largeur,int Hauteur);
    00103 void Undo(void);
    00104 void Redo(void);
    00105 void Detruire_la_page_courante(void);
    00106 void Interchanger_image_principale_et_brouillon(void);
    00107
    00108 void Changer_facteur_loupe(byte Indice_facteur);
    00109
    00110 void Remap_picture(void);
    00111
    00112 #define ToWinX(x) (((x)*Menu_Facteur_X)+Fenetre_Pos_X)
    00113 #define ToWinY(y) (((y)*Menu_Facteur_Y)+Fenetre_Pos_Y)
    00114 #define ToWinL(l) ((l)*Menu_Facteur_X)
    00115 #define ToWinH(h) ((h)*Menu_Facteur_Y)
    00116
    00117 // Définition d'une fonction générique de traçage de figures:
    00118 fonction_afficheur Pixel_figure;
    00119 void Mettre_Ecran_A_Jour(short X, short Y, short Largeur, short Hauteur);