note 93726 added to function.imagesetthickness
| From: | raffidotsemerciyanatgmaildotcom at osu1 dot php dot net | Date: | Thu, 24 Sep 2009 15:42:09 +0000 |
| Subject: | note 93726 added to function.imagesetthickness | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161022@lists.php.net to get a copy of this message | ||
Sorry, in my previous post I didn't consider to fill color inside the badly closed ellipse.
Below is my Ellipse function that is sensitive to imagesetthickness function AND that creates a
properly closed ellipse.
function myimageellipse($image, $x, $y, $rx, $ry, $color)
{
// We don't use imageellipse because the imagesetthickness function has
// no effect. So the better workaround is to use imagearc.
imagearc($image,$x,$y,$rx,$ry, 0,359,$color);
// If we stop here, we don't have a properly closed ellipse.
// Using imagefill at this point will flood outside the ellipse (actually arc).
// We have to close the arc to make it a real ellipse.
$cos359=0.99984769;
$sin359=-0.01745240;
$x1=round($x+$rx/2*$cos359);
$y1=round($y+$ry/2*$sin359);
$x2=round($x+$rx/2);
$y2=round($y);
// imageline is sensitive to imagesetthickness as well.
imageline($image,$x1,$y1,$x2,$y2,$color);
}
----
Server IP: 60.191.132.122
Probable Submitter: 58.34.125.232
----
Manual Page -- http://www.php.net/manual/en/function.imagesetthickness.php
Edit -- https://master.php.net/note/edit/93726
Del: integrated -- https://master.php.net/note/delete/93726/integrated
Del: useless -- https://master.php.net/note/delete/93726/useless
Del: bad code -- https://master.php.net/note/delete/93726/bad+code
Del: spam -- https://master.php.net/note/delete/93726/spam
Del: non-english -- https://master.php.net/note/delete/93726/non-english
Del: in docs -- https://master.php.net/note/delete/93726/in+docs
Del: other reasons-- https://master.php.net/note/delete/93726
Reject -- https://master.php.net/note/reject/93726
Search -- https://master.php.net/manage/user-notes.php