summaryrefslogtreecommitdiffstats
path: root/pts-core/objects/pts_Graph
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-26 17:29:30 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-26 17:29:30 -0500
commit015282cacb2033182de90a9c1e5a7979105fc536 (patch)
tree703d5e8937b03e6c74f4fd1041d88dd39342eb25 /pts-core/objects/pts_Graph
parentb5b270c8d249828f77d1d7d954aace31f2a6578f (diff)
downloadphoronix-test-suite-upstream-015282cacb2033182de90a9c1e5a7979105fc536.tar.gz
phoronix-test-suite-upstream-015282cacb2033182de90a9c1e5a7979105fc536.tar.xz
phoronix-test-suite-upstream-015282cacb2033182de90a9c1e5a7979105fc536.zip
pts_Graph: Allow the use of the SWF bilde_renderer through using the
SWF_DEBUG=1 environmental variable
Diffstat (limited to 'pts-core/objects/pts_Graph')
-rw-r--r--pts-core/objects/pts_Graph/pts_Graph.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/pts-core/objects/pts_Graph/pts_Graph.php b/pts-core/objects/pts_Graph/pts_Graph.php
index dd4222d..c152511 100644
--- a/pts-core/objects/pts_Graph/pts_Graph.php
+++ b/pts-core/objects/pts_Graph/pts_Graph.php
@@ -110,7 +110,8 @@ abstract class pts_Graph
putenv("GDFONTPATH=" . getcwd());
}
- // Set a renderer
+ // Determine renderers available
+ $ming_available = extension_loaded("ming");
if(!extension_loaded("gd"))
{
/* if(dl("gd.so"))
@@ -124,8 +125,13 @@ abstract class pts_Graph
{
$gd_available = true;
}
-
- if($gd_available && getenv("SVG_DEBUG") == false)
+
+ // Set a renderer
+ if($ming_available && getenv("SWF_DEBUG") != false)
+ {
+ $this->setRenderer("SWF");
+ }
+ else if($gd_available && getenv("SVG_DEBUG") == false)
{
$this->setRenderer("PNG");
}
@@ -260,6 +266,14 @@ abstract class pts_Graph
{
$this->graph_output = $file;
}
+ public function graphWidth()
+ {
+ return $this->graph_attr_width;
+ }
+ public function graphHeight()
+ {
+ return $this->graph_attr_height;
+ }
//
// Misc Functions