summaryrefslogtreecommitdiffstats
path: root/src/colors
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-10-27 10:27:14 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-10-27 10:27:14 +0000
commit4ed2de1f6271653a6f965237a245d0d4c2535aab (patch)
treef5add06d6b7d81e687e978f334d01e4ebc9f0ad3 /src/colors
parent1658235bc062aed25270711694430deba7c31c77 (diff)
downloadzetacomponents-graph-4ed2de1f6271653a6f965237a245d0d4c2535aab.zip
zetacomponents-graph-4ed2de1f6271653a6f965237a245d0d4c2535aab.tar.gz
- Added more tests and fixed some minor setter and getter bugs
Diffstat (limited to 'src/colors')
-rw-r--r--src/colors/color.php6
-rw-r--r--src/colors/radial_gradient.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/colors/color.php b/src/colors/color.php
index e987432..688621c 100644
--- a/src/colors/color.php
+++ b/src/colors/color.php
@@ -68,7 +68,7 @@ class ezcGraphColor extends ezcBaseOptions
$this->properties[$propertyName] = max( 0, min( 255, (int) $propertyValue ) );
break;
default:
- throw new ezcGraphNoSuchDataSetException( $propertyName );
+ throw new ezcBasePropertyNotFoundException( $propertyName );
break;
}
}
@@ -131,7 +131,7 @@ class ezcGraphColor extends ezcBaseOptions
}
// Set missing values to zero
- for ( ++$nr; $nr < count( $keys ); ++$nr )
+ for ( $nr; $nr < count( $keys ); ++$nr )
{
$key = $keys[$nr];
$color->$key = 0;
@@ -162,7 +162,7 @@ class ezcGraphColor extends ezcBaseOptions
}
// Set missing values to zero
- for ( ++$nr; $nr < count( $keys ); ++$nr )
+ for ( $nr; $nr < count( $keys ); ++$nr )
{
$key = $keys[$nr];
$color->$key = 0;
diff --git a/src/colors/radial_gradient.php b/src/colors/radial_gradient.php
index 5b49d01..bbc28c2 100644
--- a/src/colors/radial_gradient.php
+++ b/src/colors/radial_gradient.php
@@ -83,7 +83,7 @@ class ezcGraphRadialGradient extends ezcGraphColor
$this->properties['height'] = (float) $propertyValue;
break;
case 'offset':
- $this->properties['offset'] = min( 0, max( 1, (float) $propertyValue ) );
+ $this->properties['offset'] = min( 1., max( 0., (float) $propertyValue ) );
break;
case 'startColor':
$this->properties['startColor'] = ezcGraphColor::create( $propertyValue );
OpenPOWER on IntegriCloud