source-class-Com.Tecnick.Color.Model.Template

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
  1: <?php
  2: /**
  3:  * Template.php
  4:  *
  5:  * @since       2015-02-21
  6:  * @category    Library
  7:  * @package     Color
  8:  * @author      Nicola Asuni <info@tecnick.com>
  9:  * @copyright   2015-2015 Nicola Asuni - Tecnick.com LTD
 10:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 11:  * @link        https://github.com/tecnickcom/tc-lib-color
 12:  *
 13:  * This file is part of tc-lib-color software library.
 14:  */
 15: 
 16: namespace Com\Tecnick\Color\Model;
 17: 
 18: /**
 19:  * Com\Tecnick\Color\Model\Template
 20:  *
 21:  * Color Model Interface
 22:  *
 23:  * @since       2015-02-21
 24:  * @category    Library
 25:  * @package     Color
 26:  * @author      Nicola Asuni <info@tecnick.com>
 27:  * @copyright   2015-2015 Nicola Asuni - Tecnick.com LTD
 28:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 29:  * @link        https://github.com/tecnickcom/tc-lib-color
 30:  */
 31: interface Template
 32: {
 33:     /**
 34:      * Get an array with all color components
 35:      *
 36:      * @return array
 37:      */
 38:     public function getArray();
 39: 
 40:     /**
 41:      * Get an array with color components values normalized between 0 and $max.
 42:      * NOTE: the alpha and other fraction component values are kept in the [0..1] range.
 43:      *
 44:      * @param int $max Maximum value to return (reference value)
 45:      *
 46:      * @return array
 47:      */
 48:     public function getNormalizedArray($max);
 49: 
 50:     /**
 51:      * Get the CSS representation of the color
 52:      *
 53:      * @return string
 54:      */
 55:     public function getCssColor();
 56: 
 57:     /**
 58:      * Get the color format used in Acrobat JavaScript
 59:      * NOTE: the alpha channel is omitted from this representation unless is 0 = transparent
 60:      *
 61:      * @return string
 62:      */
 63:     public function getJsPdfColor();
 64: 
 65:     /**
 66:      * Get a space separated string with color component values.
 67:      *
 68:      * @return string
 69:      */
 70:     public function getComponentsString();
 71: 
 72:     /**
 73:      * Get the color components format used in PDF documents
 74:      * NOTE: the alpha channel is omitted
 75:      *
 76:      * @return string
 77:      */
 78:     public function getPdfColor();
 79:     
 80:     /**
 81:      * Get an array with Gray color components
 82:      *
 83:      * @return array with keys ('gray')
 84:      */
 85:     public function toGrayArray();
 86:     
 87:     /**
 88:      * Get an array with RGB color components
 89:      *
 90:      * @return array with keys ('red', 'green', 'blue', 'alpha')
 91:      */
 92:     public function toRgbArray();
 93: 
 94:     /**
 95:      * Get an array with HSL color components
 96:      *
 97:      * @return array with keys ('hue', 'saturation', 'lightness', 'alpha')
 98:      */
 99:     public function toHslArray();
100: 
101:     /**
102:      * Get an array with CMYK color components
103:      *
104:      * @return array with keys ('cyan', 'magenta', 'yellow', 'key', 'alpha')
105:      */
106:     public function toCmykArray();
107: 
108:     /**
109:      * Invert the color
110:      */
111:     public function invertColor();
112: }
113: 
 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy