summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-10-09 13:48:28 +0000
committerDerick Rethans <derick@php.net>2002-10-09 13:48:28 +0000
commitf6f58fc3005c097c6f22473a82348a0c1819e987 (patch)
tree8c273cfc1cc4047832ebada2309f1b6a9755c5c8
parent70e49320f100dbf6dbc486de6b8d9082c4f30f53 (diff)
downloadphp-git-f6f58fc3005c097c6f22473a82348a0c1819e987.tar.gz
- Added test case for bug #19266
-rw-r--r--ext/gd/tests/bug19266.phpt48
1 files changed, 48 insertions, 0 deletions
diff --git a/ext/gd/tests/bug19266.phpt b/ext/gd/tests/bug19266.phpt
new file mode 100644
index 0000000000..124be152fa
--- /dev/null
+++ b/ext/gd/tests/bug19266.phpt
@@ -0,0 +1,48 @@
+--TEST--
+gdimagefill() function (Bug #19366 (in bundled libgd))
+--POST--
+--GET--
+--INI--
+--FILE--
+<?php
+echo "Alive\n";
+$width = 50;
+$height = 100;
+$ImHandle = imagecreate($width,$height);
+echo "Alive\n";
+//Define colors
+$MyBlue = imagecolorAllocate($ImHandle, 0, 0, 255);
+$MyRed = imagecolorAllocate($ImHandle, 255, 0, 0);
+$MyWhite = imagecolorAllocate($ImHandle, 255, 255, 255);
+$MyBlack = imagecolorAllocate($ImHandle, 0, 0, 0);
+echo "Alive\n";
+//Draw
+ImageFill($ImHandle,0,0,$MyBlack);
+ImageLine($ImHandle,20,20,180,20,$MyWhite);
+ImageLine($ImHandle,20,20,20,70,$MyBlue);
+ImageLine($ImHandle,20,70,180,70,$MyRed);
+ImageLine($ImHandle,180,20,180,45,$MyWhite);
+ImageLine($ImHandle,180,70,180,45,$MyRed);
+ImageLine($ImHandle,20,20,100,45,$MyBlue);
+ImageLine($ImHandle,20,70,100,45,$MyBlue);
+ImageLine($ImHandle,100,45,180,45,$MyRed);
+ImageFill($ImHandle,21,45,$MyBlue);
+ImageFill($ImHandle,100,69,$MyRed);
+ImageFill($ImHandle,100,21,$MyWhite);
+ImageString($ImHandle,4,40,75,"Czech Republic",$MyWhite);
+echo "Alive\n";
+// Send to browser
+Header("Content-type: image/PNG");
+//ImagePNG($ImHandle);
+echo "Alive\n";
+//Free resources
+imagedestroy($ImHandle);
+echo "Alive\n";
+?>
+--EXPECT--
+Alive
+Alive
+Alive
+Alive
+Alive
+Alive