Draw a rectangle : imagefilledrectangle « Graphics Image « PHP






Draw a rectangle

 
<?php
    $image = imagecreate(400,300);
    $white = imagecolorallocate($image, 255, 255, 255);
    imagefilledrectangle($image, 10, 10, 390, 290, $white);
?>
  
  








Related examples in the same category

1.Changing colors with a loop
2.Drawing a Filled Rectangle with imagefilledrectangle()
3.Creating and Applying Different Shapes and Patterns