note 89971 added to function.imageline

From: Date: Tue, 31 Mar 2009 13:17:43 +0000
Subject: note 89971 added to function.imageline
Groups: php.notes 
Request: Send a blank email to php-notes+get-152649@lists.php.net to get a copy of this message
I've modified the Arrow function of likavcan. This arrowFunction draws the arrow filled : function arrow($im, $x1, $y1, $x2, $y2, $alength, $awidth, $color) { if( $alength > 1 ) arrow( $im, $x1, $y1, $x2, $y2, $alength - 1, $awidth - 1, $color ); $distance = sqrt(pow($x1 - $x2, 2) + pow($y1 - $y2, 2)); $dx = $x2 + ($x1 - $x2) * $alength / $distance; $dy = $y2 + ($y1 - $y2) * $alength / $distance; $k = $awidth / $alength; $x2o = $x2 - $dx; $y2o = $dy - $y2; $x3 = $y2o * $k + $dx; $y3 = $x2o * $k + $dy; $x4 = $dx - $y2o * $k; $y4 = $dy - $x2o * $k; imageline($im, $x1, $y1, $dx, $dy, $color); imageline($im, $x3, $y3, $x4, $y4, $color); imageline($im, $x3, $y3, $x2, $y2, $color); imageline($im, $x2, $y2, $x4, $y4, $color); } ---- Server IP: 212.124.37.9 Probable Submitter: 193.254.155.48 ---- Manual Page -- http://www.php.net/manual/en/function.imageline.php Edit -- https://master.php.net/note/edit/89971 Del: integrated -- https://master.php.net/note/delete/89971/integrated Del: useless -- https://master.php.net/note/delete/89971/useless Del: bad code -- https://master.php.net/note/delete/89971/bad+code Del: spam -- https://master.php.net/note/delete/89971/spam Del: non-english -- https://master.php.net/note/delete/89971/non-english Del: in docs -- https://master.php.net/note/delete/89971/in+docs Del: other reasons-- https://master.php.net/note/delete/89971 Reject -- https://master.php.net/note/reject/89971 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152649) next »