PHP Developers Network
http://forums.devnetwork.net/

How drawing using PHP?
http://forums.devnetwork.net/viewtopic.php?f=32&t=4296
Page 1 of 1

Author:  Darginec [ Wed Nov 13, 2002 2:57 am ]
Post subject:  How drawing using PHP?

Help!
Please, if know write how drawing the diagram?
:wink:

Author:  volka [ Wed Nov 13, 2002 3:18 am ]
Post subject: 

what diagram?
here's a small example (of something ;) )
Syntax: [ Download ] [ Hide ]
<?php

$y1 = (isset($_GETї'startY']))?$_GETї'startY'] : 50;

$y2 = (isset($_GETї'endY']))?$_GETї'endY'] : 50;



$img = imagecreate(100,100);



$color = imagecolorallocate ($img, 200, 200, 200);

imagerectangle($img, 0,0,99,99, $color);



$color = imagecolorallocate ($img, 255, 0, 0);

imageline($img, 0, $y1, 99, $y2, $color);



header('Content-type: image/png');

imagepng($img);

?>
have a look at http://www.php.net/manual/en/ref.image.php

Author:  Heavy [ Wed Nov 13, 2002 6:59 am ]
Post subject: 


Author:  twigletmac [ Wed Nov 13, 2002 7:13 am ]
Post subject: 

heavy -
Syntax: [ Download ] [ Hide ]
$y1 = (isset($_GETї'startY']))?$_GETї'startY'] : 50;

This would equate to:
Syntax: [ Download ] [ Hide ]
if (isset($_GETї'startY'])) {

   $y1 = $_GETї'startY'];

} else {

   $y1 = 50;

}

Mac

Author:  Jeph [ Thu Jul 22, 2004 6:07 am ]
Post subject: 

I suggest you download my class ;)


Author:  JayBird [ Thu Jul 22, 2004 6:16 am ]
Post subject: 

Why reply to a topic that is nearly 2 years old :)

You had me thinking Twig was back

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/