diff -r 000000000000 -r 4eba9c11703f web/Zend/Pdf/Color/GrayScale.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Pdf/Color/GrayScale.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,84 @@ + 1) { $grayLevel = 1; } + + $this->_grayLevel = new Zend_Pdf_Element_Numeric($grayLevel); + } + + /** + * Instructions, which can be directly inserted into content stream + * to switch color. + * Color set instructions differ for stroking and nonstroking operations. + * + * @param boolean $stroking + * @return string + */ + public function instructions($stroking) + { + return $this->_grayLevel->toString() . ($stroking? " G\n" : " g\n"); + } + + /** + * Get color components (color space dependent) + * + * @return array + */ + public function getComponents() + { + return array($this->_grayLevel->value); + } +} +