note 33701 deleted from function.imagecolorallocatealpha by cece
| From: | cece@php.net | Date: | Sat, 16 Aug 2003 19:35:40 +0000 |
| Subject: | note 33701 deleted from function.imagecolorallocatealpha by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54427@lists.php.net to get a copy of this message | ||
Note Submitter: malibox@gmx.net
----
/* look like this solves your problem ;-) */
$x = 300;
$Image=imagecreatetruecolor($x,$x);
// something to get a white background
$back = imagecolorallocate( $Image, 255, 255, 255 );
$border = imagecolorallocate( $Image, 0, 0, 0);
imagefilledrectangle ( $Image, 0, 0, $x-1, $x-1, $back);
imagerectangle ( $Image, 0, 0, $x-1, $x-1, $border);
$yellowX = 100;
$yellowY = 75;
$redX = 120;
$redY = 165;
$blueX = 187;
$blueY = 125;
$radius = 150;
$yellow = imagecolorallocateAlpha ( $Image, 255, 255, 0,75);
$red = ImageColorAllocateAlpha( $Image, 255, 0, 0, 75 );
$blue = ImageColorAllocateAlpha ( $Image, 0, 0, 255,75 );
// use Ellipse drawing instead of filled arcs, ImageFill filles a empty space ....
ImageFilledEllipse($Image, $yellowX, $yellowY,$radius,$radius,$yellow);
ImageFilledEllipse($Image, $redX, $redY,$radius,$radius,$red);
ImageFilledEllipse($Image, $blueX, $blueY,$radius,$radius,$blue);
ImagePNG($Image);
ImageDestroy($Image);