Carla's Drawing

My Drawing



SLAVE CODE FOLLOWS

<?php

// === create background work area

// create a blank image that is 160 by 160 pixels in size
$image imagecreatetruecolor(160160);

// set a color RGB (238, 238, 238), which is GRAY
$gray imagecolorallocate($image238238238);

//  fill the entire image
imagefilledrectangle($image00160160$gray);

$circleColor imagecolorallocate($image200200255);
imagefilledellipse($image8080300150$circleColor);

$circleColor2 imagecolorallocate($image20050255);
imagefilledellipse($image8080150150$circleColor2);


$polygonColor imagecolorallocate($image4030150);
$points = [
6050,
15020,
80200
];

imagefilledpolygon($image$points3$polygonColor);

// create another color
$color1 imagecolorallocate($image200160100);

// init vars
$x 80;
$y 100;
$corners[0] = array('x' => 100'y' =>  100);
$corners[1] = array('x' =>   -130'y' => 200);
$corners[2] = array('x' => 40'y' =>300);

// create the graphic
for ($i 0$i 100000$i++)
{
    
imagesetpixel($imageround($x), round($y), $color1);
    
$a rand(02);
    
$x = ($x $corners[$a]['x']) / 2;
    
$y = ($y $corners[$a]['y']) / 2;
}

// set the foreground RGB color for the text
$color imagecolorallocate($image255255255);

$font '../Fonts/arial.ttf';
$str "Capstelli";

// combine the background image with a rotated text using the following specs
// (image, font-size, angle-rotation, x-position, y-position, text-color, font-name, text)
imagettftext($image252025130$color$font$str);

// tell the server that a GIF image  follows
header("Content-Type: image/gif");

// display the image
imagegif($image);

// destroy the image (i.e., releases memory)
imagedestroy($image);
?>