note 33701 added to function.imagecolorallocatealpha

From: Date: Fri, 04 Jul 2003 13:39:58 +0000
Subject: note 33701 added to function.imagecolorallocatealpha
Groups: php.notes 
Request: Send a blank email to php-notes+get-51511@lists.php.net to get a copy of this message
/* 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); ---- Manual Page -- http://www.php.net/manual/en/function.imagecolorallocatealpha.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33701 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33701&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33701&report=yes

« previous php.notes (#51511) next »