????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.22.70.233 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 : /proc/self/root/home/b8009/php-5.6.22/ext/gd/tests/ |
Upload File : |
--TEST-- Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype < 2.4.10 --SKIPIF-- <?php if(!extension_loaded('gd')){ die('skip gd extension not available'); } if(!function_exists('imagettftext')) die('skip imagettftext() not available'); include dirname(__FILE__) . '/func.inc'; if(version_compare(get_freetype_version(), '2.4.10') >= 0) die('skip for freetype < 2.4.10'); ?> --FILE-- <?php $cwd = dirname(__FILE__); $font = "$cwd/Tuffy.ttf"; $delta_t = 360.0 / 16; # Make 16 steps around $g = imagecreate(800, 800); $bgnd = imagecolorallocate($g, 255, 255, 255); $black = imagecolorallocate($g, 0, 0, 0); $x = 100; $y = 0; $cos_t = cos(deg2rad($delta_t)); $sin_t = sin(deg2rad($delta_t)); for ($angle = 0.0; $angle < 360.0; $angle += $delta_t) { $bbox = imagettftext($g, 24, $angle, 400+$x, 400+$y, $black, $font, 'ABCDEF'); $s = vsprintf("(%d, %d), (%d, %d), (%d, %d), (%d, %d)\n", $bbox); echo $s; $temp = $cos_t * $x + $sin_t * $y; $y = $cos_t * $y - $sin_t * $x; $x = $temp; } imagepng($g, "$cwd/bug43073.png"); ?> --CLEAN-- <?php @unlink(dirname(__FILE__) . '/bug43073.png'); ?> --EXPECTF-- (500, 40%d), (610, 40%d), (610, 376), (500, 376) (492, 363), (591, 322), (580, 295), (480, 336) (470, 331), (548, 254), (527, 233), (449, 310) (439, 309), (483, 202), (461, 193), (416, 299) (40%d, 300), (40%d, 183), (38%d, 183), (38%d, 300) (362, 307), (316, 195), (291, 205), (337, 318) (330, 329), (246, 244), (224, 265), (308, 350) (308, 360), (202, 316), (190, 344), (296, 388) (300, %d), (18%d, %d), (18%d, 425), (%d, 425) (306, 437), (195, 483), (206, 510), (318, 464) (328, 469), (240, 557), (260, 578), (349, 491) (359, 491), (312, 607), (334, 616), (382, 501) (%d, 500), (%d, 618), (41%d, 618), (41%d, 500) (436, 493), (483, 607), (507, 597), (461, 482) (468, 471), (555, 558), (577, 538), (490, 450) (490, 440), (600, 485), (611, 457), (502, 412)