summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/pChart2.1.2/examples/example.writeBounds.php
diff options
context:
space:
mode:
Diffstat (limited to 'notFinishedCode/pChart2.1.2/examples/example.writeBounds.php')
-rw-r--r--notFinishedCode/pChart2.1.2/examples/example.writeBounds.php67
1 files changed, 67 insertions, 0 deletions
diff --git a/notFinishedCode/pChart2.1.2/examples/example.writeBounds.php b/notFinishedCode/pChart2.1.2/examples/example.writeBounds.php
new file mode 100644
index 0000000..5e831a0
--- /dev/null
+++ b/notFinishedCode/pChart2.1.2/examples/example.writeBounds.php
@@ -0,0 +1,67 @@
+<?php
+ /* CAT:Misc */
+
+ /* pChart library inclusions */
+ include("../class/pDraw.class.php");
+ include("../class/pImage.class.php");
+
+ /* Create the pChart object */
+ $myPicture = new pImage(800,630); //result image size
+ $myPicture->drawGradientArea(0,0,800,630,DIRECTION_VERTICAL,array("StartR"=>100,"StartG"=>100,"StartB"=>100,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>100));//make gradient
+ $myPicture->drawGradientArea(0,0,800,630,DIRECTION_HORIZONTAL,array("StartR"=>100,"StartG"=>100,"StartB"=>100,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>20));//make gradient
+ $myPicture->drawGradientArea(0,0,60,630,DIRECTION_HORIZONTAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>100));//black gradient field on left
+
+ /* Do some cosmetics, add the black outlining and the name of the picture on left side*/
+ $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
+ $myPicture->drawLine(60,0,60,230,array("R"=>70,"G"=>70,"B"=>70));
+ $myPicture->drawRectangle(0,0,799,629,array("R"=>0,"G"=>0,"B"=>0));
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>11));
+ $myPicture->drawText(30,400,"Network test results - UNIVERSITY OF FREIBURG",array("R"=>255,"G"=>255,"B"=>255,"FontSize"=>20,"Angle"=>90,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE));
+
+ // add some picture somewhere :)
+ /* Draw a PNG object */
+ // x1, y1, x2, y2
+ //line to landline
+ $myPicture->drawLine(430, 390,430,560,array("R"=>0,"G"=>255,"B"=>0,"Ticks"=>8,"Weight"=>1));
+ $myPicture->drawFromPNG(400,550,"telephone.png");
+
+
+ //BTS1
+ $myPicture->drawLine(180, 70,420,330,array("R"=>0,"G"=>255,"B"=>0,"Ticks"=>8,"Weight"=>1));
+ $myPicture->drawFromPNG(160,60,"BTSCont.png");
+
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/verdana.ttf","FontSize"=>6));
+ $TextSettings = array("DrawBox"=>TRUE,"R"=>255,"G"=>255,"B"=>255,"Angle"=>0,"FontSize"=>10);
+ $myPicture->drawText(70,140,"BTS1 STATUS: OK",$TextSettings);
+
+
+ //BTS2
+ $myPicture->drawLine(190, 320, 420,350,array("R"=>0,"G"=>255,"B"=>0,"Ticks"=>8,"Weight"=>1));
+ $myPicture->drawFromPNG(160,280,"BTSCont.png");
+ $myPicture->drawFromPNG(110,300,"newIcons/BTSNOK1.png");
+
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/verdana.ttf","FontSize"=>6));
+ $TextSettings = array("DrawBox"=>TRUE,"R"=>255,"G"=>0,"B"=>0,"Angle"=>0,"FontSize"=>10);
+ $myPicture->drawText(70,360,"BTS2 STATUS: NOT OK",$TextSettings);
+
+
+ //BTS3
+ $myPicture->drawLine(200, 550,420,380,array("R"=>0,"G"=>255,"B"=>0,"Ticks"=>8,"Weight"=>1));
+ $myPicture->drawFromPNG(160,500,"BTSCont.png");
+
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/verdana.ttf","FontSize"=>6));
+ $TextSettings = array("DrawBox"=>TRUE,"R"=>255,"G"=>255,"B"=>255,"Angle"=>0,"FontSize"=>10);
+ $myPicture->drawText(70,580,"BTS3 STATUS: OK",$TextSettings);
+
+
+
+
+
+ $myPicture->drawFromPNG(380,280,"server.png");
+ //$myPicture->writeLabel("Testing",0);
+
+
+
+ /* Render the picture (choose the best way) */
+ $myPicture->autoOutput("pictures/example.writeBounds.png");
+?>