"Fossies" - the Fresh Open Source Software Archive

Member "OCSNG_UNIX_SERVER_2.6/ocsreports/libraries/tclib/Color/Model/Template.php" (17 Apr 2019, 2636 Bytes) of package /linux/privat/OCSNG_UNIX_SERVER_2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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/tecnick.com/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/tecnick.com/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 the color components format used in PDF documents
   67      * NOTE: the alpha channel is omitted
   68      *
   69      * @return string
   70      */
   71     public function getPdfColor();
   72     
   73     /**
   74      * Get an array with Gray color components
   75      *
   76      * @return array with keys ('gray')
   77      */
   78     public function toGrayArray();
   79     
   80     /**
   81      * Get an array with RGB color components
   82      *
   83      * @return array with keys ('red', 'green', 'blue', 'alpha')
   84      */
   85     public function toRgbArray();
   86 
   87     /**
   88      * Get an array with HSL color components
   89      *
   90      * @return array with keys ('hue', 'saturation', 'lightness', 'alpha')
   91      */
   92     public function toHslArray();
   93 
   94     /**
   95      * Get an array with CMYK color components
   96      *
   97      * @return array with keys ('cyan', 'magenta', 'yellow', 'key', 'alpha')
   98      */
   99     public function toCmykArray();
  100 
  101     /**
  102      * Invert the color
  103      */
  104     public function invertColor();
  105 }