note 39895 deleted from function.imageline by cmb
| From: | cmb@php.net | Date: | Fri, 15 Jul 2016 16:10:48 +0000 |
| Subject: | note 39895 deleted from function.imageline by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206023@lists.php.net to get a copy of this message | ||
Note Submitter: XxXoldsaltXxX at hotmail dot com
----
Script to draw a grid of lines, which make the entire side of the picture look like a quarter
circle.. very cool :)
<?php
$img_disp = imagecreate(1000,1000);
$backcolor = imagecolorallocate($img_disp,0,0,0);
imagefill($img_disp,0,0,$backcolor);
$textcolor = imagecolorallocate($img_disp,255,0,0);
$x1 = 0;
$y1 = 0;
$x2 = 0;
$y2 = 1000;
for(;;){
$y1 = $y1 + 20;
$x2 = $x2 + 20;
imageline($img_disp,$x1,$y1,$x2,$y2,$textcolor);
if ($y1 == 1000){
break;
}
}
header("Content-type: image/png");
imagepng($img_disp); // Draw the image
imagedestroy($img_disp); // Delete the image from the server's memory
?>