note 114236 added to imagickdraw.circle
| From: | SkepticaLee | Date: | Mon, 27 Jan 2014 21:26:10 +0000 |
| Subject: | note 114236 added to imagickdraw.circle | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198367@lists.php.net to get a copy of this message | ||
The four values required here are a bit confusing. After all, a circle is defined by three values:
the x, y coordinates of the centre, and the radius, r.
The fourth value is redundant, but has to be given, otherwise the function fails. One way of coping
with this redundancy is:
<?php
$draw = new ImagickDraw ();
//given that $x and $y are the coordinates of the centre, and $r the radius:
$draw->circle ($x, $y, $x + $r, $y);
?>
There are any number of actions which are synonymous with the last, including:
<?php
$draw->circle ($x, $y, $x, $y + $r);
$draw->circle ($x, $y, $x - $r, $y);
$draw->circle ($x, $y, $x, $y - $r);
// etc, etc.
?>
Hope this helps.
----
Server IP: 213.172.110.14
Probable Submitter: 89.182.69.28
----
Manual Page -- http://php.net/manual/en/imagickdraw.circle.php
Edit -- https://master.php.net/note/edit/114236
Del: integrated -- https://master.php.net/note/delete/114236/integrated
Del: useless -- https://master.php.net/note/delete/114236/useless
Del: bad code -- https://master.php.net/note/delete/114236/bad+code
Del: spam -- https://master.php.net/note/delete/114236/spam
Del: non-english -- https://master.php.net/note/delete/114236/non-english
Del: in docs -- https://master.php.net/note/delete/114236/in+docs
Del: other reasons-- https://master.php.net/note/delete/114236
Reject -- https://master.php.net/note/reject/114236
Search -- https://master.php.net/manage/user-notes.php