arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something?
| From: | Richard Marks | Date: | Mon, 29 Oct 2001 16:08:00 +0000 |
| Subject: | arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-72732@lists.php.net to get a copy of this message | ||
what in the world is wrong here?
--------------------------------------------------------------------------------
<?
Header ("Content-type: image/png");
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
function box( $img, $x, $y, $x2, $y2, $color )
{
imageline( $img,$x,$y,$x2,$y,$color );
imageline( $img,$x,$y2,$x2,$y2,$color );
imageline( $img,$x,$y,$x,$y2,$color );
imageline( $img,$x2,$y,$x2,$y2,$color );
}
function Square( $x, $y, $size, $pcolor )
{
if ($size < 50)
break;
box($img,$x,$y,$x+$size,$y-$size,$pcolor );
Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
imagerectangle($img,0,0,$width,$height,$color);
Square ($img, -1000,1000,2000,$pixel_color );
imagepng($img);
?>
--------------------------------------------------------------------------------
thanks,
Sincerely,
GZM Software® WebMaster
webmaster@gzmsoftware.f2s.com
http://www.gzmsoftware.f2s.com