Fun Shapes!
Here are a few fun shapes designed with PHP.
SLAVE CODE FOLLOWS
<?php
$image = imagecreate(150, 200);
$na = imagecolorallocate($image, 255, 0, 255);
$color = imagecolorallocate($image, 255, 255, 204);
$triangle = array(10,20, 100,200, 300,200);
$pts = count($triangle)/2;
imagepolygon($image, $triangle, $pts, $color);
imagefilledpolygon($image, $triangle, $pts, $color);
header("Content-type: image/png");
imagepng($image);
imagedestroy ($image);
?>
SLAVE CODE FOLLOWS
<?php
$myRectangle = imagecreate( 200, 100);
$myOne = imagecolorallocate( $myRectangle, 255, 0, 0);
$myTwo = imagecolorallocate( $myRectangle, 153, 204, 255);
imagerectangle( $myRectangle, 15, 35, 120, 60, $myOne);
header("Content-type: image/png");
imagepng($myRectangle);
imagedestroy($myRectangle);
?>
SLAVE CODE FOLLOWS
<?php
$myLine = imagecreate( 200, 100);
$myBlue = imagecolorallocate( $myLine, 255, 255, 255);
$myGreen = imagecolorallocate( $myLine, 128, 128, 128);
imageline( $myLine, 400, 400, 60, 60, $myGreen);
header("Content-type: image/png");
imagepng($myLine);
imagedestroy($myLine);
?>