????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.28 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/b8009/php-5.6.22/ext/gd/tests/ |
Upload File : |
--TEST--
imageline, dashed
--SKIPIF--
<?php
if (!function_exists('imagecreatefromstring')) die("skip gd extension not available\n");
?>
--FILE--
<?php
$im = imagecreatetruecolor(6,6);
imagefill($im, 0,0, 0xffffff);
$r = 0xff0000;
$b = 0x0000ff;
$style = array($r, $b);
imagesetstyle($im, $style);
// Horizontal line
imageline($im, 0,5, 5,5, IMG_COLOR_STYLED);
$p1 = imagecolorat($im, 0,5) == $r;
$p2 = imagecolorat($im, 1,5) == $b;
$p3 = imagecolorat($im, 2,5) == $r;
$p4 = imagecolorat($im, 3,5) == $b;
$p5 = imagecolorat($im, 4,5) == $r;
$p5 = imagecolorat($im, 5,5) == $b;
if ($p1 && $p2 && $p3 && $p4 && $p5) {
echo "Horizontal: ok\n";
}
imagedestroy($im);
$im = imagecreatetruecolor(6,6);
imagefill($im, 0,0, 0xffffff);
$style = array($r, $b);
imagesetstyle($im, $style);
imageline($im, 2,0, 2,5, IMG_COLOR_STYLED);
$p1 = imagecolorat($im, 2,0) == $r;
$p2 = imagecolorat($im, 2,1) == $b;
$p3 = imagecolorat($im, 2,2) == $r;
$p4 = imagecolorat($im, 2,3) == $b;
$p5 = imagecolorat($im, 2,4) == $r;
$p6 = imagecolorat($im, 2,5) == $b;
if ($p1 && $p2 && $p3 && $p4 && $p5 && $p6) {
echo "Vertical: ok\n";
}
imagedestroy($im);
$im = imagecreatetruecolor(6,6);
imagefill($im, 0,0, 0xffffff);
$style = array($r, $b);
imagesetstyle($im, $style);
imageline($im, 0,0, 5,5, IMG_COLOR_STYLED);
$p1 = imagecolorat($im, 0,0) == $r;
$p2 = imagecolorat($im, 1,1) == $b;
$p3 = imagecolorat($im, 2,2) == $r;
$p4 = imagecolorat($im, 3,3) == $b;
$p5 = imagecolorat($im, 4,4) == $r;
$p6 = imagecolorat($im, 5,5) == $b;
if ($p1 && $p2 && $p3 && $p4 && $p5 && $p6) {
echo "Diagonal: ok\n";
}
imagedestroy($im);
?>
--EXPECTF--
Horizontal: ok
Vertical: ok
Diagonal: ok