note 70557 added to function.imagefilledellipse

From: Date: Fri, 20 Oct 2006 11:15:06 +0000
Subject: note 70557 added to function.imagefilledellipse
Groups: php.notes 
Request: Send a blank email to php-notes+get-118836@lists.php.net to get a copy of this message
draws a gradient filled ellipse with alpha color support based on felixbruns at <ANTI-SPAM>web dot de imagegradientellipse function. thx felixbruns :o) function imagegradientellipsealpha($image, $cx, $cy, $w, $h, $ic, $oc){ $w = abs($w); $h = abs($h); $oc = array(0xFF & ($oc >> 0x10), 0xFF & ($oc >> 0x8), 0xFF & $oc); $ic = array(0xFF & ($ic >> 0x10), 0xFF & ($ic >> 0x8), 0xFF & $ic); $c0 = ($oc[0] - $ic[0]) / $w; $c1 = ($oc[1] - $ic[1]) / $w; $c2 = ($oc[2] - $ic[2]) / $w; $ot = $oc >> 24; $it = $ic >> 24; $ct = ($ot - $it) / $w; $i = 0; $j = 0; $is = ($w<$h)?($w/$h):1; $js = ($h<$w)?($h/$w):1; while(1){ $r = $oc[0] - floor($i * $c0); $g = $oc[1] - floor($i * $c1); $b = $oc[2] - floor($i * $c2); $t = $ot - floor($i * $ct); $c = imagecolorallocatealpha($image, $r, $g, $b, $t); imageellipse($image, $cx, $cy, $w-$i, $h-$j, $c); if($i < $w){ $i += $is; } if($j < $h){ $j += $js; } if($i >= $w && $j >= $h){ break; } } } ---- Server IP: 66.163.161.117 Probable Submitter: 84.180.240.231 ---- Manual Page -- http://www.php.net/manual/en/function.imagefilledellipse.php Edit -- https://master.php.net/note/edit/70557 Del: integrated -- https://master.php.net/note/delete/70557/integrated Del: useless -- https://master.php.net/note/delete/70557/useless Del: bad code -- https://master.php.net/note/delete/70557/bad+code Del: spam -- https://master.php.net/note/delete/70557/spam Del: non-english -- https://master.php.net/note/delete/70557/non-english Del: in docs -- https://master.php.net/note/delete/70557/in+docs Del: other reasons-- https://master.php.net/note/delete/70557 Reject -- https://master.php.net/note/reject/70557 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118836) next »