php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42843 imagefilledarc(...) don't draw same ellipse as in previous version of PHP
Submitted: 2007-10-03 17:25 UTC Modified: 2007-10-04 06:27 UTC
From: nicosinus33 at yahoo dot fr Assigned: pajoye (profile)
Status: Not a bug Package: GD related
PHP Version: 5.2.4 OS: Windows 2003 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicosinus33 at yahoo dot fr
New email:
PHP Version: OS:

 

 [2007-10-03 17:25 UTC] nicosinus33 at yahoo dot fr
Description:
------------
The function imagefilledarc(...) is used to draw partial ellipse.
In PHP 5.2.3, when the arc start angle is the same that the arc end angle, the function draws an empty ellipse.

In the same condition, but using PHP5.2.4, the function draws a full ellipse.


Reproduce code:
---------------
<?php

// create image
$image = imagecreatetruecolor(100, 100);

// allocate some solors
$red = imagecolorallocate($image, 0xFF, 0x00, 0x00);


//draw the ellipse
imagefilledarc($image, 50, 50, 100, 50, 75, 75 , $red, IMG_ARC_PIE);


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


Expected result:
----------------
Like in PHP 5.2.3,  the code must draw nothing (an empty ellipse) 

Actual result:
--------------
The code draws a red ellipse.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-04 06:27 UTC] pajoye@php.net
The regression was introduced in 5.2.3 and has been yet fixed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 09:01:30 2024 UTC