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
 [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

Pull Requests

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: Sun Dec 22 06:01:30 2024 UTC