Source: lesson_17_dessin_c.php | Résultat |
<img src="../exercises/dessin_c.php">
Fichier : dessin_c.php
<?php header("Content-type: image/Jpeg"); // Create a new Image $im = ImageCreate(700,500); // 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); //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,70+$a,300-$a,100+2*$a,200,0,360,$myColorBleu1); imageArc($im,500,400-$b,150-$a,120-$a,0,360,$myColorBleu1); $a=$a+4; $b=$b+8; }
//Imageinterlace($im, 1); // Output the Image to the browser in jpeg format ImageJpeg($im); // Destroy the image. ?>
|
|