xref: /PHP-8.1/ext/gd/tests/bug73614.phpt (revision a375d547)
1--TEST--
2Bug #73614 (gdImageFilledArc() doesn't properly draw pies)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream bugfix not yet released');
8?>
9--FILE--
10<?php
11require_once __DIR__ . '/func.inc';
12
13$image = imagecreatetruecolor(500, 500);
14
15$white    = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
16$navy     = imagecolorallocate($image, 0x00, 0x00, 0x80);
17$red      = imagecolorallocate($image, 0xFF, 0x00, 0x00);
18
19imagefilledarc($image, 250, 250, 500, 250, 0, 88, $white, IMG_ARC_PIE);
20imagefilledarc($image, 250, 250, 500, 250, 88, 91 , $navy, IMG_ARC_PIE);
21imagefilledarc($image, 250, 250, 500, 250, 91, 360 , $red, IMG_ARC_PIE);
22
23test_image_equals_file(__DIR__ . '/bug73614.png', $image);
24?>
25--EXPECT--
26The images are equal.
27