| Current File : /home/k/a/r/karenpetzb/www/items/category/Color.zip |
PK ��G[[��?D D
GrayScale.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Pdf_Exception */
require_once 'Zend/Pdf/Exception.php';
/** Zend_Pdf_Color */
require_once 'Zend/Pdf/Color.php';
/** Zend_Pdf_Element_Numeric */
require_once 'Zend/Pdf/Element/Numeric.php';
/**
* GrayScale color implementation
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Pdf_Color_GrayScale extends Zend_Pdf_Color
{
/**
* GrayLevel.
* 0.0 (black) - 1.0 (white)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_grayLevel;
/**
* Object constructor
*
* @param float $grayLevel
*/
public function __construct($grayLevel)
{
$this->_grayLevel = new Zend_Pdf_Element_Numeric($grayLevel);
if ($this->_grayLevel->value < 0) {
$this->_grayLevel->value = 0;
}
if ($this->_grayLevel->value > 1) {
$this->_grayLevel->value = 1;
}
}
/**
* 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");
}
}
PK ��G[�Ǒ
�
Rgb.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Pdf_Exception */
require_once 'Zend/Pdf/Exception.php';
/** Zend_Pdf_Color */
require_once 'Zend/Pdf/Color.php';
/** Zend_Pdf_Element_Numeric */
require_once 'Zend/Pdf/Element/Numeric.php';
/**
* RGB color implementation
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Pdf_Color_Rgb extends Zend_Pdf_Color
{
/**
* Red level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_r;
/**
* Green level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_g;
/**
* Blue level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_b;
/**
* Object constructor
*
* @param float $r
* @param float $g
* @param float $b
*/
public function __construct($r, $g, $b)
{
/** Clamp values to legal limits. */
if ($r < 0) { $r = 0; }
if ($r > 1) { $r = 1; }
if ($g < 0) { $g = 0; }
if ($g > 1) { $g = 1; }
if ($b < 0) { $b = 0; }
if ($b > 1) { $b = 1; }
$this->_r = new Zend_Pdf_Element_Numeric($r);
$this->_g = new Zend_Pdf_Element_Numeric($g);
$this->_b = new Zend_Pdf_Element_Numeric($b);
}
/**
* 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->_r->toString() . ' '
. $this->_g->toString() . ' '
. $this->_b->toString() . ($stroking? " RG\n" : " rg\n");
}
}
PK ��G[r[�'� � Cmyk.phpnu &1i� <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Pdf_Exception */
require_once 'Zend/Pdf/Exception.php';
/** Zend_Pdf_Color */
require_once 'Zend/Pdf/Color.php';
/** Zend_Pdf_Element_Numeric */
require_once 'Zend/Pdf/Element/Numeric.php';
/**
* CMYK color implementation
*
* @category Zend
* @package Zend_Pdf
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Pdf_Color_Cmyk extends Zend_Pdf_Color
{
/**
* Cyan level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_c;
/**
* Magenta level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_m;
/**
* Yellow level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_y;
/**
* Key (BlacK) level.
* 0.0 (zero concentration) - 1.0 (maximum concentration)
*
* @var Zend_Pdf_Element_Numeric
*/
private $_k;
/**
* Object constructor
*
* @param float $c
* @param float $m
* @param float $y
* @param float $k
*/
public function __construct($c, $m, $y, $k)
{
$this->_c = new Zend_Pdf_Element_Numeric($c);
$this->_m = new Zend_Pdf_Element_Numeric($m);
$this->_y = new Zend_Pdf_Element_Numeric($y);
$this->_k = new Zend_Pdf_Element_Numeric($k);
if ($this->_c->value < 0) { $this->_c->value = 0; }
if ($this->_c->value > 1) { $this->_c->value = 1; }
if ($this->_m->value < 0) { $this->_m->value = 0; }
if ($this->_m->value > 1) { $this->_m->value = 1; }
if ($this->_y->value < 0) { $this->_y->value = 0; }
if ($this->_y->value > 1) { $this->_y->value = 1; }
if ($this->_k->value < 0) { $this->_k->value = 0; }
if ($this->_k->value > 1) { $this->_k->value = 1; }
}
/**
* 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->_c->toString() . ' '
. $this->_m->toString() . ' '
. $this->_y->toString() . ' '
. $this->_k->toString() . ($stroking? " K\n" : " k\n");
}
}
PK ��G[�@7�O>