Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Drawing a Polygon in php

Mon Oct 27, 2008 5:44 pm

Code:
<?php
header
("Content-type: image/gif");
$image = imagecreate( 200, 200 );
$red = imagecolorallocate($image, 255,0,0);
$blue = imagecolorallocate($image, 0,0,255 );
$points = array (10, 10,
                 
190, 190,
                 
190, 10,
                 
10, 190
);
imagefilledpolygon( $image, $points, count( $points )/2 , $blue );
imagegif($image);
?>




Post a reply
  Related Posts  to : Drawing a Polygon in php
 Polygon in Java     -  
 how to attach a texture to polygon     -  
 Draw Oval,Arc,Polygon,string,Line,Round and 3D Rectangle     -  
 drawing sonic     -  
 Drawing a Square in php     -  
 Drawing Lines in php     -  
 Drawing a Triangler in php     -  
 php drawing a circle     -  
 drawing the histogram of image     -  
 Drawing cone using openGL     -  

Topic Tags

PHP Graphics