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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 9 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 05:03:35 2021 UTC