Source: lesson_17_dessin_d.php | Résultat |
<img src="../exercises/dessin_d.php">
Fichier : dessin_d.php
<?php header("Content-type: image/Jpeg"); // Create a new Image $im = ImageCreate(800,800); // Fill it with your favorite background color.. $backgroundColor = ImageColorAllocate($im,247,243,198); $lineColor = ImageColorAllocate($im, 0,0,0); $myColorBleu1 = imageColorAllocate($im,10,64,128); $myColorJaune = imageColorAllocate($im,241,195,23); //ImageFill($im, 0, 0, $backgroundColor); $a=0; $b=0; for($i=0;$i<300;$i=$i+10) { // imageline($im,75,100-$a,$a+5,100-$a+10,$lineColor); imageArc($im,400,400,50+$a,$a+30,0,360,$myColorBleu1); $a=$a+20; } imageFillToBorder($im,100,100,$myColorBleu1,$myColorJaune); imageFillToBorder($im,400,400,$myColorBleu1,$myColorJaune);
//Imageinterlace($im, 1); // Output the Image to the browser in jpeg format ImageJpeg($im); // Destroy the image. ?>
|
|