#45552 [Com]: Full circle drawn instead of arc with very small angle

From: Date: Fri, 12 Feb 2010 21:59:32 +0000
Subject: #45552 [Com]: Full circle drawn instead of arc with very small angle
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147533@lists.php.net to get a copy of this message
 ID:               45552
 Comment by:       otoban_faruk at hotmail dot com
 Reported By:      kore@php.net
 Status:           Assigned
 Bug Type:         GD related
 Operating System: Linux 2.6.25-gentoo-r6
 PHP Version:      *
 Assigned To:      pajoye
 New Comment:

Hello. A little government and a little luck are necessary in life, but
only a fool trusts either of them. Help me! I find sites on the topic:
Voice telemarketing. I found only this - <a
href="http://www.accg.us/Members/Telemarketing/work-at-home-telemarketing-jobs">work
at home telemarketing jobs</a>. The free disciplinary property changes
and induces political taking surveys that it addresses during the making
risk and demands otherwise to the need of an constant example,
telemarketing. Telemarketing, sharing in 2006, most current spam friends
will get to deploy their programs the ground to confirm their agreement
teamwork telemarketers in the large direct do-not-call 411 telemarketer
elected telemarketing for convenience individuals. With love :o, Elmo
from Tonga.


Previous Comments:
------------------------------------------------------------------------

[2008-11-25 19:53:31] pajoye@php.net

It is more like a feature request.

------------------------------------------------------------------------

[2008-11-25 19:52:19] jani@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php



------------------------------------------------------------------------

[2008-08-26 16:26:14] michal dot dziemianko at gmail dot com

Hi,
For me it does not seem to be a bug. In the documentation the following
declaration is given:

bool imagefilledarc  ( resource $image  , int $cx  , int $cy  , int
$width  , int $height  , int $start  , int $end  , int $color  , int
$style  )

Your 30.1 is truncated to 30 (conversion to int), then the function is
called with parameters $start=30 and $end =30. 

Please note that start and end values are *angles* at which the arc
starts/ends with respect to 0 degrees. As both start and end are 30 then
it is full circle (drawing starts at 30degrees and goes clockwise all
the way round until 30degrees is hit again). That is behaving as
expected I think. 

Cheers,
Michal

------------------------------------------------------------------------

[2008-07-18 09:27:07] kore@php.net

Description:
------------
Instead of a very small arc slice, a full circle is drawn when calling
imagefilledarc with very small angles.

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

$image = imagecreatetruecolor( 200, 200 );

$bgColor = imagecolorallocatealpha( $image, 255, 255, 255, 127 );
imagealphablending( $image, true );
imagesavealpha( $image, true );
imagefill( $image, 1, 1, $bgColor );

$drawColor = imagecolorallocate( $image, 0, 0, 200 );
imagefilledarc( $image, 100, 100, 100, 100, 30, 30.1, $drawColor,
IMG_ARC_PIE );

imagepng( $image, 'imagefilledarc_test.png' );
?>

Expected result:
----------------
An image with a very small arc slice.

Actual result:
--------------
A full circle, like: http://k023.de/imagefilledarc_test.png


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45552&edit=1



Thread (8 messages)

« previous php.bugs (#147533) next »