web/lib/Zend/Pdf/Resource/Image.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     1 <?php
       
     2 /**
       
     3  * Zend Framework
       
     4  *
       
     5  * LICENSE
       
     6  *
       
     7  * This source file is subject to the new BSD license that is bundled
       
     8  * with this package in the file LICENSE.txt.
       
     9  * It is also available through the world-wide-web at this URL:
       
    10  * http://framework.zend.com/license/new-bsd
       
    11  * If you did not receive a copy of the license and are unable to
       
    12  * obtain it through the world-wide-web, please send an email
       
    13  * to license@zend.com so we can send you a copy immediately.
       
    14  *
       
    15  * @category   Zend
       
    16  * @package    Zend_Pdf
       
    17  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    19  * @version    $Id: Image.php 22908 2010-08-25 20:52:47Z alexander $
       
    20  */
       
    21 
       
    22 
       
    23 /** Internally used classes */
       
    24 
       
    25 /** Zend_Pdf_Element_Name */
       
    26 require_once 'Zend/Pdf/Element/Name.php';
       
    27 
       
    28 
       
    29 /** Zend_Pdf_Resource */
       
    30 require_once 'Zend/Pdf/Resource.php';
       
    31 
       
    32 
       
    33 /**
       
    34  * Image abstraction.
       
    35  *
       
    36  * @package    Zend_Pdf
       
    37  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    38  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    39  */
       
    40 abstract class Zend_Pdf_Resource_Image extends Zend_Pdf_Resource
       
    41 {
       
    42     /**
       
    43      * Object constructor.
       
    44      */
       
    45     public function __construct()
       
    46     {
       
    47         parent::__construct('');
       
    48 
       
    49         $this->_resource->dictionary->Type    = new Zend_Pdf_Element_Name('XObject');
       
    50         $this->_resource->dictionary->Subtype = new Zend_Pdf_Element_Name('Image');
       
    51     }
       
    52     /**
       
    53      * get the height in pixels of the image
       
    54      *
       
    55      * @return integer
       
    56      */
       
    57     abstract public function getPixelHeight();
       
    58 
       
    59     /**
       
    60      * get the width in pixels of the image
       
    61      *
       
    62      * @return integer
       
    63      */
       
    64     abstract public function getPixelWidth();
       
    65 
       
    66     /**
       
    67      * gets an associative array of information about an image
       
    68      *
       
    69      * @return array
       
    70      */
       
    71     abstract public function getProperties();
       
    72 }
       
    73