public function setDrawColor($cs = 'rgb', $c1 = 0, $c2 = 0, $c3 = 0, $c4 = 0)
{
$cs = Horde_String::lower($cs);
// convert hex to rgb
if ($cs == 'hex') {
$cs = 'rgb';
list($c1, $c2, $c3) = $this->_hexToRgb($c1);
}
if ($cs == 'rgb') {
$this->_draw_color = sprintf('%.3F %.3F %.3F RG', $c1, $c2, $c3);
} elseif ($cs == 'cmyk') {
$this->_draw_color = sprintf('%.3F %.3F %.3F %.3F K', $c1, $c2, $c3, $c4);
} else {
$this->_draw_color = sprintf('%.3F G', $c1);
}
if ($this->_page > 0) {
$this->_out($this->_draw_color);
}
}