| Source: lesson_17_g0_filled.php | Résultat | 
| 
<img src="../exercises/img_f0_polygon.php"><img src="../exercises/img_g0_filled.php">
 
 
 
Fichier : img_g0_filled.php
 
 
<?phpheader("Content-type: image/png");
 //création de l'image
 $image = imagecreate(400,210);
 // couleur de fond
 $bg = imagecolorallocate($image,255,218,185 );
 // couleur pour les bords du polygone
 $col_poly = imagecolorallocate($image,160,82,45 );
 // on definit l'épaisseur des traits
 ImageSetThickness($image,12) ;
 // on affiche l'image
 $degrees = 180;
 imagefilledpolygon ($image,
 array (0,10,  100,200,  300,200,  400,10),
 4,$col_poly);
 imagepng($image);
 ?>
 
 |     |