summaryrefslogtreecommitdiffstats
path: root/src/options/svg_driver.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-06-28 13:23:00 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-06-28 13:23:00 +0000
commit6ed7f3a9b1814879c8fed5f55db1ae409797f76c (patch)
treef69295bc766e04744f43a8811574c69836049dc0 /src/options/svg_driver.php
parentd6bae028524a0fc548080d7b8ae1d8fa38102248 (diff)
downloadzetacomponents-graph-6ed7f3a9b1814879c8fed5f55db1ae409797f76c.zip
zetacomponents-graph-6ed7f3a9b1814879c8fed5f55db1ae409797f76c.tar.gz
- Added SVG driver
Diffstat (limited to 'src/options/svg_driver.php')
-rw-r--r--src/options/svg_driver.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/options/svg_driver.php b/src/options/svg_driver.php
index 27e362b..b07664e 100644
--- a/src/options/svg_driver.php
+++ b/src/options/svg_driver.php
@@ -16,6 +16,13 @@ class ezcGraphSvgDriverOptions extends ezcGraphDriverOptions
{
/**
+ * Assumed percentual average width of chars with the used font
+ *
+ * @var float
+ */
+ protected $assumedCharacterWidth = .55;
+
+ /**
* Set an option value
*
* @param string $propertyName
@@ -28,6 +35,9 @@ class ezcGraphSvgDriverOptions extends ezcGraphDriverOptions
{
switch ( $propertyName )
{
+ case 'assumedCharacterWidth':
+ $this->assumedCharacterWidth = min( 1, max( 0, (float) $propertyValue ) );
+ break;
default:
parent::__set( $propertyName, $propertyValue );
break;
OpenPOWER on IntegriCloud