example of a Simple grid...
bool imagegrid ( resource $image, int $width, int $Height,
int $size, mixed $color )
<?php
Header("Content-type: image/png");
$Width=450;
$Height=450;
$img = ImageCreateTrueColor($Width, $Height);
$bg = imagecolorallocate($img, 255, 255, 255);
imagefill($img, 0, 0, $bg);
$grid = imagecolorallocate($img, 225, 245, 249);
imagesetstyle($img, array($bg, $grid));
imagegrid($img, $Width, $Height, 10, IMG_COLOR_STYLED);
//makegrid($img, $Width, $Height, 10, $grid);
ImagePNG($img);
ImageDestroy($img);
function imagegrid($image, $w, $h, $s, $color)
{
for($iw=1; $iw<$w/$s; $iw++){imageline($image, $iw*$s,
0, $iw*$s, $w, $color);}
for($ih=1; $ih<$h/$s; $ih++){imageline($image, 0,
$ih*$s, $w, $ih*$s, $color);}
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 71.52.53.142
----
Manual Page -- h
ttp://www.php.net/manual/en/function.imageline.php
Edit -- https://master
.php.net/note/edit/74856
Del: integrated -- h
ttps://master.php.net/note/delete/74856/integrated
Del: useless -- http
s://master.php.net/note/delete/74856/useless
Del: bad code -- htt
ps://master.php.net/note/delete/74856/bad+code
Del: spam -- https:/
/master.php.net/note/delete/74856/spam
Del: non-english --
https://master.php.net/note/delete/74856/non-english
Del: in docs -- http
s://master.php.net/note/delete/74856/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/74856
Reject -- https://mast
er.php.net/note/reject/74856
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|