|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-08-01 00:07 UTC] pajoye@php.net
-Status: Open
+Status: Bogus
[2011-08-01 00:07 UTC] pajoye@php.net
[2011-08-01 13:02 UTC] evi1m4chine at googlemail dot com
[2011-08-01 13:05 UTC] evi1m4chine at googlemail dot com
[2011-08-01 13:11 UTC] pajoye@php.net
[2011-08-01 13:58 UTC] evi1m4chine at googlemail dot com
[2011-09-01 15:42 UTC] gpuzankin at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 10:00:02 2025 UTC |
Description: ------------ When drawing filled arcs with a alpha-transparent color, imagefilledarc creates a transparency gradient that looks like it drew a number of lines on top of each other. The supplied test script and info below is easier to understand, than a textual description can be, GDlib version: 2.0.35 P.S.: The reason I made a new bug for this, is that the old ones are years old, abandonded, lackinng reproducability and are vague in their description. This one is easy to reproduce with the script, very specific and clearly described. The only bugs can be marked as duplicates of this one. Test script: --------------- <?php // Outputs a PNG image with alpha transparency. function imagefilledroundedrectangle(&$im, $x1, $y1, $x2, $y2, $radius, $color) { imagefilledrectangle($im, $x1+$radius, $y1, $x2-$radius, $y1+$radius, $color); imagefilledrectangle($im, $x1, $y1+$radius, $x2, $y2-$radius, $color); imagefilledrectangle($im, $x1+$radius, $y2-$radius, $x2-$radius, $y2, $color); imagefilledarc($im, $x2-$radius, $y2-$radius, $radius*2, $radius*2, 0, 90, $color, IMG_ARC_PIE); imagefilledarc($im, $x1+$radius, $y2-$radius, $radius*2, $radius*2, 90, 180, $color, IMG_ARC_PIE); imagefilledarc($im, $x1+$radius, $y1+$radius, $radius*2, $radius*2, 180, 270, $color, IMG_ARC_PIE); imagefilledarc($im, $x2-$radius, $y1+$radius, $radius*2, $radius*2, 270, 360, $color, IMG_ARC_PIE); } $img = imagecreatetruecolor(200,200); imagefilledroundedrectangle($img, 50, 50, 150, 150, 25, 0x1F7F7F7F); imagepng($img); imagedestroy($img); ?> Expected result: ---------------- A transparent PNG image of 200×200px, containing a rectangle of 100×100px at the center, which has corners rounded to a radius of 25px, a 50% gray color and *uniform* transparency of 25%. Actual result: -------------- A transparent PNG image of 200×200px, containing a rectangle of 100×100px at the center, which has corners rounded to a radius of 25px, a 50% gray color and a transparency *angle gradient* of 0-100%.