php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54001 The chord drawing is incorrect
Submitted: 2011-02-12 17:43 UTC Modified: 2014-07-16 03:32 UTC
From: mallluhuct at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: GD related
PHP Version: 5.3.5 OS: Mac OS X 10.6.6
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: mallluhuct at gmail dot com
New email:
PHP Version: OS:

 

 [2011-02-12 17:43 UTC] mallluhuct at gmail dot com
Description:
------------
When I try to generate chords, I only get the outer border (not the arc) in no-
fill mode and if I want to generate a filled chord, it appears to fill the outer 
part of it, producing a triangle instead of a chord

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

$width = 400;
$height = 300;

$canvas = imagecreatetruecolor($width, $height);

imagefilledrectangle($canvas, 0, 0, $width, $height, imagecolorallocatealpha($canvas, 0, 0, 0, 0));

imagefilledarc($canvas, 200, 150, $width / 2, $height / 2, 45, 135, imagecolorallocatealpha($canvas, 255, 255, 255, 0), IMG_ARC_CHORD /* | IMG_ARC_NOFILL */);

imagejpeg($canvas, '/path/to/chord.jpg');

Expected result:
----------------
Chord = pie - triangle

Actual result:
--------------
I am getting pie - chord (only the triangle)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-16 03:32 UTC] yohgaki@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yohgaki
 [2014-07-16 03:32 UTC] yohgaki@php.net
It seems working as it should with 5.4 or later.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 12:01:28 2024 UTC