note 58010 added to function.imageline
| From: | php-general at lists dot php dot net | Date: | Fri, 21 Oct 2005 14:30:41 +0000 |
| Subject: | note 58010 added to function.imageline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-97352@lists.php.net to get a copy of this message | ||
imageline coordinate variables are documented as int , a value in decimal format will be truncated.
This may be useful when, for example, applying a non-integer scaling factor in generating an image.
Care should be taken to ensure this does not create significant errors that affect the quality of
the image. For example :
<?php
$x=0.00000000001;$y=100;
imageline($img,0,0,0,$y+$x);
imageline($img,0,0,0,$y-$x);
?>
the first line will be straight , the second will have a step. Use round() where appropriate.
----
Manual Page -- http://www.php.net/manual/en/function.imageline.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58010
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58010&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58010&report=yes
Search -- http://master.php.net/manage/user-notes.php