\r
echo 'Rectangle: ';\r
imagerectangle($img, $x1, $y1, $x2, $y2, $black);\r
- draw_and_check_pixel(($x1 + $x2) / 2, $y1);\r
- draw_and_check_pixel($x1, ($y1 + $y2) / 2);\r
- draw_and_check_pixel(($x1 + $x2) / 2, $y2);\r
- draw_and_check_pixel($x2, ($y1 + $y2) / 2);\r
+ $x = ($x1 + $x2) / 2;\r
+ $y = ($y1 + $y2) / 2;\r
+ draw_and_check_pixel($x, $y1);\r
+ draw_and_check_pixel($x1, $y);\r
+ draw_and_check_pixel($x, $y2);\r
+ draw_and_check_pixel($x2, $y);\r
echo PHP_EOL;\r
}\r
\r
$img = imagecreate(110, 210);\r
$bgnd = imagecolorallocate($img, 255, 255, 255);\r
-$black = imagecolorallocate($img, 0, 0, 0);\r
-$red = imagecolorallocate($img, 255, 0, 0);\r
+$black = imagecolorallocate($img, 0, 0, 0);\r
+$red = imagecolorallocate($img, 255, 0, 0);\r
\r
-draw_and_check_rectangle(10, 10, 50, 50);\r
-draw_and_check_rectangle(50, 60, 10, 100);\r
-draw_and_check_rectangle(50, 150, 10, 110);\r
-draw_and_check_rectangle(10, 200, 50, 160);\r
+draw_and_check_rectangle( 10, 10, 50, 50);\r
+draw_and_check_rectangle( 50, 60, 10, 100);\r
+draw_and_check_rectangle( 50, 150, 10, 110);\r
+draw_and_check_rectangle( 10, 200, 50, 160);\r
imagesetthickness($img, 4);\r
-draw_and_check_rectangle(60, 10, 100, 50);\r
-draw_and_check_rectangle(100, 60, 60, 100);\r
-draw_and_check_rectangle(100, 150, 60, 110);\r
-draw_and_check_rectangle(60, 200, 100, 160);\r
+draw_and_check_rectangle( 60, 10, 100, 50);\r
+draw_and_check_rectangle(100, 60, 60, 100);\r
+draw_and_check_rectangle(100, 150, 60, 110);\r
+draw_and_check_rectangle( 60, 200, 100, 160);\r
\r
-imagepng($img, __DIR__ . '/bug53156.png');\r
-?>\r
---CLEAN--\r
-<?php\r
-@unlink(__DIR__ . '/bug53156.png');\r
+//imagepng($img, __DIR__ . '/bug53156.png'); // debug\r
?>\r
--EXPECT--\r
Rectangle: ++++\r