Re: cvs: phpdoc /en/reference/image/functions imagecolorallocatealpha.xml
| From: | Derick Rethans | Date: | Sat, 16 Aug 2003 20:39:49 +0000 |
| Subject: | Re: cvs: phpdoc /en/reference/image/functions imagecolorallocatealpha.xml | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969355851@lists.php.net to get a copy of this message | ||
On Sat, 16 Aug 2003, Heilig (Cece) Szabolcs wrote:
> cece Sat Aug 16 15:29:17 2003 EDT
>
> Modified files:
> /phpdoc/en/reference/image/functions imagecolorallocatealpha.xml
> Log:
> added example (incorporated from user notes)
>
> +$size = 300;
> +$Image=imagecreatetruecolor($size, $size);
> +// something to get a white background
> +$back = imagecolorallocate( $Image, 255, 255, 255 );
> +$border = imagecolorallocate( $Image, 0, 0, 0);
> +imagefilledrectangle ( $Image, 0, 0, $size-1, $size-1, $back);
> +imagerectangle ( $Image, 0, 0, $size-1, $size-1, $border);
Can you please stick to the PEAR coding standards? Thus it should be:
$size = 300;
$image = imagecreatetruecolor($size, $size);
// something to get a white background
$back = imagecolorallocate($image, 255, 255, 255);
$border = imagecolorallocate($image, 0, 0, 0);
imagefilledrectangle($image, 0, 0, $size - 1, $size - 1, $back);
imagerectangle($image, 0, 0, $size - 1, $size - 1, $border);
$yellow_x = 100;
$yellow_y = 75;
etc...
Derick
--
"Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails."
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
International PHP Magazine http://php-mag.net/
-------------------------------------------------------------------------