note 80584 deleted from function.imageline by tularis

From: Date: Wed, 23 Jan 2008 17:25:52 +0000
Subject: note 80584 deleted from function.imageline by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-135341@lists.php.net to get a copy of this message
Note Submitter: sow dot olivier at free dot fr Reason: useless ---- //a function to draw circular purcentage function drawPurcent($purcent, $rayon=16) { header("Content-type: image/png"); $drawPurcent_WIDTH=$rayon; $drawPurcent_HEIGHT=$rayon; $img=imagecreate($drawPurcent_WIDTH,$drawPurcent_HEIGHT); $background_color=imagecolorallocate($img, 255, 0, 0); $fore_color=imagecolorallocate($img, 0, 0, 0); $p100_color=imagecolorallocate($img, 255, 255, 255); for( $i=0; $i<=360 ; $i++) {# if($i<360/100*$purcent) {# imageline($img, $drawPurcent_WIDTH/2, $drawPurcent_HEIGHT/2, cos(deg2rad($i))*$drawPurcent_WIDTH/2 +$drawPurcent_WIDTH/2, sin(deg2rad($i))*$drawPurcent_HEIGHT/2 +$drawPurcent_HEIGHT/2, $fore_color ); } else {# imageline($img, cos(deg2rad($i))*$drawPurcent_WIDTH/2 +$drawPurcent_WIDTH/2, sin(deg2rad($i))*$drawPurcent_HEIGHT/2 +$drawPurcent_HEIGHT/2, cos(deg2rad($i))*$drawPurcent_WIDTH/2 +$drawPurcent_WIDTH/2, sin(deg2rad($i))*$drawPurcent_HEIGHT/2 +$drawPurcent_HEIGHT/2, $fore_color ); } } if($purcent==100) {# imageline($img,0,0,$rayon,$rayon,$p100_color); imageline($img,0,$rayon,$rayon,0,$p100_color); } imagecolortransparent($img,$background_color); imagepng($img); imagedestroy($img); }//function

« previous php.notes (#135341) next »