note 32930 added to function.imagefilltoborder

From: Date: Wed, 11 Jun 2003 10:02:48 +0000
Subject: note 32930 added to function.imagefilltoborder
Groups: php.notes 
Request: Send a blank email to php-notes+get-50161@lists.php.net to get a copy of this message
Very useful to build a pseudo-sphere with a color gradient... <?php $width = 300; $center = $width / 2; $colordivs = 255 / $center; $im = @imagecreate($width, $width); $back_color = imagecolorallocate($im, 20, 30, 40); imagefill($im, 0, 0, $back_color); for ($i = 0; $i <= $center; $i++) { $diametre = $width - 2 * $i; $el_color = imagecolorallocate($im, $i * $colordivs, 0, 0); imagearc($im, $center, $center, $diametre, $diametre, 0, 360, $el_color); imagefilltoborder($im, $center, $center, $el_color, $el_color); } imagepng($im); ?> Dark Skull Software http://www.darkskull.net ---- Manual Page -- http://www.php.net/manual/en/function.imagefilltoborder.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32930 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32930&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32930&report=yes

« previous php.notes (#50161) next »