Ellipse with border and fill alpha
Posted: Wed Mar 03, 2010 7:51 am
I need some help in drawing an ellipse with fill and border, both having different alpha color
The code is,
The image that I'm expecting is the test.png that I've attached with this post. But the output that I'm getting now is result.png (as attached)
Can anyone please help me with this.
Regards,
Hari
The code is,
Code: Select all
<?php
$img = imageCreateTrueColor( 600, 600);
$red = imagecolorallocatealpha($img, 255, 0, 0,50);
$blue = imagecolorallocatealpha($img, 0, 0, 255,50);
imagefilledellipse ($img, 300, 300, 400, 400, $red);
imagefilledellipse ($img, 300, 300, 350, 350, $blue);
header( 'Content-Type: image/png' );
imagePNG( $img );
imagedestroy($img);
?>
Can anyone please help me with this.
Regards,
Hari