php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74001 imagefilledarc
Submitted: 2017-01-26 11:14 UTC Modified: 2017-01-26 11:43 UTC
From: andi at z1-web dot de Assigned: cmb (profile)
Status: Duplicate Package: GD related
PHP Version: 7.0.15 OS: Windows 10 / XAMPP
Private report: No CVE-ID: None
 [2017-01-26 11:14 UTC] andi at z1-web dot de
Description:
------------
The pie chart is displayed incorrectly with angle 90 degrees:
(big gaps between the cake pieces)

imagefilledarc($img, 155, 63, 150, 75, 1, 90, $blue, IMG_ARC_PIE);
imagefilledarc($img, 155, 63, 150, 75, 90, 360, $green, IMG_ARC_PIE);


With other angle like 120 degrees there are no problems:

imagefilledarc($img, 155, 63, 150, 75, 1, 120, $blue, IMG_ARC_PIE);
imagefilledarc($img, 155, 63, 150, 75, 120, 360, $green, IMG_ARC_PIE);



Test script:
---------------
<?php
$img = imagecreatetruecolor(440, 123);

$blue = imagecolorallocate($img, 80, 108, 255);
$green = imagecolorallocate($img, 48, 217, 26);

imagefill($img, 0, 0, $white);

imagefilledarc($img, 155, 63, 150, 75, 1, 90, $blue, IMG_ARC_PIE);
imagefilledarc($img, 155, 63, 150, 75, 90, 360, $green, IMG_ARC_PIE);

header('Content-type: image/png');
imagepng($img);
imagedestroy($img);
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-26 11:38 UTC] krakjoe@php.net
-Package: *Graphics related +Package: GD related -Assigned To: +Assigned To: cmb
 [2017-01-26 11:43 UTC] cmb@php.net
-Status: Assigned +Status: Duplicate
 [2017-01-26 11:43 UTC] cmb@php.net
Duplicate of bug #73614.
 [2018-01-20 17:04 UTC] scripts at bauser-enterprises dot com
Same problem with Windows 10, also Windows 7 (both Professional) under PHP 7.x. With PHP 5.6.x everything is ok but XAMPP with PHP 7.x displays big gaps between the cake pieces.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC