note 105038 added to function.imageline

From: Date: Sun, 24 Jul 2011 16:44:01 +0000
Subject: note 105038 added to function.imageline
Groups: php.notes 
Request: Send a blank email to php-notes+get-181809@lists.php.net to get a copy of this message
The most bold-line-functions i found have problems with lines in a certian direction (they draw smaller lines with some angles). To do a real bold line just use this function: function imageBoldLine($resource, $x1, $y1, $x2, $y2, $Color, $BoldNess=2, $func='imageLine') { $center = round($BoldNess/2); for($i=0;$i<$BoldNess;$i++) { $a = $center-$i; if($a<0){$a -= $a;} for($j=0;$j<$BoldNess;$j++) { $b = $center-$j; if($b<0){$b -= $b;} $c = sqrt($a*$a + $b*$b); if($c<=$BoldNess) { $func($resource, $x1 +$i, $y1+$j, $x2 +$i, $y2+$j, $Color); } } } } ---- Server IP: 69.147.83.197 Probable Submitter: 91.5.238.67 ---- Manual Page -- http://www.php.net/manual/en/function.imageline.php Edit -- https://master.php.net/note/edit/105038 Del: integrated -- https://master.php.net/note/delete/105038/integrated Del: useless -- https://master.php.net/note/delete/105038/useless Del: bad code -- https://master.php.net/note/delete/105038/bad+code Del: spam -- https://master.php.net/note/delete/105038/spam Del: non-english -- https://master.php.net/note/delete/105038/non-english Del: in docs -- https://master.php.net/note/delete/105038/in+docs Del: other reasons-- https://master.php.net/note/delete/105038 Reject -- https://master.php.net/note/reject/105038 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181809) next »