summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-07-30 03:54:27 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-07-30 03:54:27 +0000
commitfa09704cea254112bc69706dd637bd7fdeb459d5 (patch)
treeb28581fae38d6d5ffe41d9c6b5b67117e5fe1e99 /ext/gd
parentb16441622ea37fd3d4dce1ca055efebed7ee90f4 (diff)
downloadphp-git-fa09704cea254112bc69706dd637bd7fdeb459d5.tar.gz
Test case for bug #42434
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/tests/bug42434.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/gd/tests/bug42434.phpt b/ext/gd/tests/bug42434.phpt
new file mode 100644
index 0000000000..cede1ac17f
--- /dev/null
+++ b/ext/gd/tests/bug42434.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #42434 (ImageLine w/ antialias = 1px shorter)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) {
+ die('skip gd extension not available');
+}
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(10, 2);
+imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);
+
+imageantialias($im, true);
+imageline($im, 0, 0, 10, 0, 0x000000);
+
+if (imagecolorat($im, 9, 0) == 0x000000) {
+ echo 'DONE';
+} else {
+ echo 'Bugged';
+}
+
+imagedestroy($im);
+?>
+--EXPECTF--
+DONE \ No newline at end of file