note 9849 modified in function.imagerectangle by felipe

From: Date: Tue, 22 Jul 2008 02:54:51 +0000
Subject: note 9849 modified in function.imagerectangle by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142466@lists.php.net to get a copy of this message
For those wanting a function to draw a grid I've created one. I hope this is the right place to post it. <?php function ImageGrid(&$im,$startx,$starty,$width,$height,$xcols,$yrows,&$color) { for ( $x=0; $x < $xcols; $x++ ) { for ( $y=0; $y < $yrows; $y++ ) { $x1 = $startx + ($width * $x); $x2 = $startx + ($width * ($x+1)); $y1 = $starty + ($height * $y); $y2 = $starty + ($height * ($y+1)); ImageRectangle($im, $x1, $y1, $x2, $y2, $color); } } } // end function ImageGrid ?> --was-- For those wanting a function to draw a grid I've created one. I hope this is the right place to post it. function ImageGrid(&$im,$startx,$starty,$width,$height,$xcols,$yrows,&$color) { for ( $x=0; $x < $xcols; $x++ ) { for ( $y=0; $y < $yrows; $y++ ) { $x1 = $startx + ($width * $x); $x2 = $startx + ($width * ($x+1)); $y1 = $starty + ($height * $y); $y2 = $starty + ($height * ($y+1)); ImageRectangle($im, $x1, $y1, $x2, $y2, $color); } } } // end function ImageGrid http://php.net/manual/en/function.imagerectangle.php

« previous php.notes (#142466) next »