Bug #74001 [Com]: imagefilledarc

From: Date: Sat, 20 Jan 2018 17:04:15 +0000
Subject: Bug #74001 [Com]: imagefilledarc
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213636@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74001&edit=1

 ID:                 74001
 Comment by:         scripts at bauser-enterprises dot com
 Reported by:        andi at z1-web dot de
 Summary:            imagefilledarc
 Status:             Duplicate
 Type:               Bug
 Package:            GD related
 Operating System:   Windows 10 / XAMPP
 PHP Version:        7.0.15
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2017-01-26 11:43:38] cmb@php.net

Duplicate of bug #73614.

------------------------------------------------------------------------
[2017-01-26 11:14:38] 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);
?>



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=74001&edit=1


Thread (3 messages)

« previous php.bugs (#213636) next »