List Info

Thread: note 74856 added to function.imageline




note 74856 added to function.imageline
user name
2007-04-30 19:45:51
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


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )