protected function GetColour($key, $no_gradient = FALSE)
{
$colour = 'none';
if (isset($this->colours[$key])) {
$colour = $this->colours[$key];
if (is_array($colour)) {
if ($no_gradient) {
// grab the first colour in the array, discarding opacity
list($colour) = explode(':', $colour[0]);
} else {
if (!isset($this->gradients[$key])) {
$this->gradients[$key] = $this->NewID();
}
$colour = 'url(#' . $this->gradients[$key] . ')';
}
}
}
return $colour;
}