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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 14:01:33 2025 UTC