Using imagefill() : Line « Graphics Image « PHP






Using imagefill()

<?php
 header("Content-type: image/gif");
 $image = imagecreate( 200, 200 );
 $red = imagecolorallocate($image, 255,0,0);
 $blue = imagecolorallocate($image, 0,0,255 );
 imageline( $image, 0, 0, 199, 199, $blue );
 imagefill( $image, 0, 199, $blue );
 imagegif($image);
?>


           
       








Related examples in the same category

1.Drawing Lines
2.Drawing a Line with imageline()