note 91779 added to function.imagickdraw-line
| From: | Peter" | Date: | Thu, 25 Jun 2009 09:36:00 +0000 |
| Subject: | note 91779 added to function.imagickdraw-line | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157464@lists.php.net to get a copy of this message | ||
There is a small imprecision in the previous user note.
You have to think of your canvas as 2D matrix, starting with x/y = 0/0. So the calculation of the
midpoint is wrong. It must be = ($width - 1) / 2 and *not* just $width / 2.
Imagine a 3x3 image, the midpoint is obviously 1/1. So you should prefer odd width/height values, if
you operate with a midpoint (chart pie, ..) and an odd stroke width (f.e. "1"). Otherwise
a line with a stroke width of "1" ends in a 2-pixel, alpha 0.5 line.
----
Server IP: 217.160.72.57
Probable Submitter: 89.244.130.51
----
Manual Page -- http://www.php.net/manual/en/function.imagickdraw-line.php
Edit -- https://master.php.net/note/edit/91779
Del: integrated -- https://master.php.net/note/delete/91779/integrated
Del: useless -- https://master.php.net/note/delete/91779/useless
Del: bad code -- https://master.php.net/note/delete/91779/bad+code
Del: spam -- https://master.php.net/note/delete/91779/spam
Del: non-english -- https://master.php.net/note/delete/91779/non-english
Del: in docs -- https://master.php.net/note/delete/91779/in+docs
Del: other reasons-- https://master.php.net/note/delete/91779
Reject -- https://master.php.net/note/reject/91779
Search -- https://master.php.net/manage/user-notes.php