hguy Posted January 7, 2008 Share Posted January 7, 2008 Hi, Im long back here for this forum. I like to clarify my doubts on venn diagrams. I need to create circle with values based on the values given in the text area. I can create the venn diagram image using php imagecreate but cant go with the inputs given. Is it possible to do with the javascript dom. I want to create three circles with the given values in the textarea. The placement of values should change dynamically on the fly. Also the there should be colour variation between circles Reply me ASAP Regards Hguy Quote Link to comment https://forums.phpfreaks.com/topic/84846-create-circles-based-on-input-given-on-textarea/ Share on other sites More sharing options...
phpQuestioner Posted January 7, 2008 Share Posted January 7, 2008 Hi, Im long back here for this forum. I like to clarify my doubts on venn diagrams. I need to create circle with values based on the values given in the text area. I can create the venn diagram image using php imagecreate but cant go with the inputs given. Is it possible to do with the javascript dom. I want to create three circles with the given values in the textarea. The placement of values should change dynamically on the fly. Also the there should be colour variation between circles Reply me ASAP Regards Hguy your going to have to try to explain this a little bit better. Quote Link to comment https://forums.phpfreaks.com/topic/84846-create-circles-based-on-input-given-on-textarea/#findComment-432544 Share on other sites More sharing options...
Barand Posted January 7, 2008 Share Posted January 7, 2008 you can pass the text to the gd image script using a querystring <img src="venn.php?text=blah"> Then in venn.php, use $text = $_GET['text'] to retrieve it Quote Link to comment https://forums.phpfreaks.com/topic/84846-create-circles-based-on-input-given-on-textarea/#findComment-432574 Share on other sites More sharing options...
hguy Posted January 31, 2008 Author Share Posted January 31, 2008 Dear guys, I have created the venn diagram using the php image create with below code <?php //$diameter = $_REQUEST["diameter"]; $diameter = 150; if ($im = imagecreate(255, 255)) $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); imagefill($im, 0, 0, $white); imageString($im, 30, 60, 18, "safasfd", $white); //imagearc(image, x, y, width,height,start,end , color); imagearc($im, $diameter/2, $diameter/2, $diameter, $diameter, 0, 360, $black); imagearc($im, 175, 75,$diameter, 150, 0, 360, $black); imagearc($im, 125, 160,$diameter, 150, 0, 360, $black); header("content-type:image/png"); //This tells the web browser to expect a PNG image. imagepng($im); imagecolordeallocate($im, $white); imagecolordeallocate($im, $black); imagedestroy($im); ?> I gives me the venn diagram... but what i need is, the venn diagram should be placed in new php page like a thumb nail... The venn should be changed dynamically as per the user input values.. How is it possible with javascript DOM Quote Link to comment https://forums.phpfreaks.com/topic/84846-create-circles-based-on-input-given-on-textarea/#findComment-454161 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.