php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77460 Filled arc render (imagefilledarc) does not render from the correct degree.
Submitted: 2019-01-15 11:25 UTC Modified: 2019-01-16 18:44 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: p1100i at gmx dot com Assigned: cmb (profile)
Status: Duplicate Package: GD related
PHP Version: 7.3.1 OS: bionic / ArchLinux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: p1100i at gmx dot com
New email:
PHP Version: OS:

 

 [2019-01-15 11:25 UTC] p1100i at gmx dot com
Description:
------------
It seems the `php-gd` module which enables using `imagefilledarc` method cannot render in some degrees corecctly.

* versions (format: `distro: version`) tested the issue on:
  * ubuntu-bionic: 7.2.10-0ubuntu0.18.04.1
  * archlinux: 7.3.1

* for reproduction install `php-gd` and allow `extension=gd` in your php.ini

Test script:
---------------
<?php

$image  = imagecreatetruecolor(100, 100);
$red    = imagecolorallocate($image, 200,   0,   0);
$white  = imagecolorallocate($image, 255, 255, 255);

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

imagefilledarc($image, 50, 50, 100, 50, 91, 360, $red, IMG_ARC_PIE);

header('Content-type: image/png');
imagepng($image, phpversion() . '.png');


Expected result:
----------------
The rendered ellipse fill should start just one degree after the 6 hour-o-clock position.

Actual result:
--------------
The rendered ellipse fill starts much more after the 6-hour-o-clock position.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-15 11:26 UTC] p1100i at gmx dot com
-Summary: Filled arc drawing does not use the correct degree. +Summary: Filled arc render (imagefilledarc) does not render from the correct degree.
 [2019-01-15 11:26 UTC] p1100i at gmx dot com
Improves title.
 [2019-01-16 18:44 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2019-01-16 18:44 UTC] cmb@php.net
This is a duplicate of bug #73614.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC