From 84759f2e507cd058d08c21372aeb11ba7e4c70eb Mon Sep 17 00:00:00 2001 From: orfao marco Date: Sun, 26 Nov 2023 17:59:32 +0100 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20'gril?= =?UTF-8?q?le.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grille.c/grille.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/grille.c/grille.c b/grille.c/grille.c index b327806..967c6c6 100644 --- a/grille.c/grille.c +++ b/grille.c/grille.c @@ -2,16 +2,34 @@ #include #include -void creer_grille(void){ - CreerFenetre(100,100,600,400); +int* creer_grille(void){ + int* Grille=NULL; + Grille=(int*) malloc(40*60*sizeof(int)); + return Grille; +} + +void creer_grille_graph(){ + int x=200,y=200; + ChoisirCouleurDessin(CouleurParComposante(0,0,0)); + DessinerRectangle(x,y,1200,1000) + DessinerRectangle(x,y,900,600); + for(x=200;x<1100;x=x+15){ + DessinerSegment(x,y,x,800); + } + x=200; + y=200; + for(y=200;y<800;y=y+15){ + DessinerSegment(x,y,1100,y); + } + } int main(void){ - char** x; + char x; InitialiserGraphique(); - creer_grille(); - while(!SourisCliquee()){ + CreerFenetre(0,0,1300,1300); + creer_grille_graph(); + while(x != 'q'){ scanf("%c",&x); } - return EXIT_SUCCESS; } \ No newline at end of file