Drawing a Triangler : Triangler : Graphics Image PHP Source Code


PHP Source Code » Graphics Image » Triangler »

 

Drawing a Triangler



<?php
     header ("Content-type: image/png");
   
     $im = ImageCreate (175175);
   
     $grey = ImageColorAllocate ($im, 230230230);
     $black = ImageColorAllocate ($im, 000);
   
     $coordinates = array();
   
     $coordinates[00;            // Point 1 x
     $coordinates[1150;          // Point 1 y
     $coordinates[2150;          // Point 2 x
     $coordinates[3150;          // Point 2 y
     $coordinates[475;           // Point 3 x
     $coordinates[575;           // Point 3 y
   
     ImageFilledPolygon($im, $coordinates, 3, $black);
   
     ImageString($im, 355"Figure 18.4: Triangle", $black);
     ImagePng ($im);
     ImageDestroy ($im);
?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Graphics Image
» Triangler