PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/zend/Zend/Pdf/Resource/Image.php

http://zoop.googlecode.com/
PHP | 77 lines | 15 code | 11 blank | 51 comment | 0 complexity | 17d66542551ce8d2b0df2ceab65c9fe5 MD5 | raw file
 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 20096 2010-01-06 02:05:09Z bkarwin $
20 */
21
22
23/** Internally used classes */
24
25/** Zend_Pdf_Element_Name */
26require_once 'Zend/Pdf/Element/Name.php';
27
28
29/** Zend_Pdf_Resource */
30require_once 'Zend/Pdf/Resource.php';
31
32
33/**
34 * Image abstraction.
35 *
36 * Class is named not in accordance to the name convention.
37 * It's "end-user" class, but its ancestor is not.
38 * Thus part of the common class name is removed.
39 *
40 * @package    Zend_Pdf
41 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
42 * @license    http://framework.zend.com/license/new-bsd     New BSD License
43 */
44abstract class Zend_Pdf_Resource_Image extends Zend_Pdf_Resource
45{
46    /**
47     * Object constructor.
48     */
49    public function __construct()
50    {
51        parent::__construct('');
52
53        $this->_resource->dictionary->Type    = new Zend_Pdf_Element_Name('XObject');
54        $this->_resource->dictionary->Subtype = new Zend_Pdf_Element_Name('Image');
55    }
56    /**
57     * get the height in pixels of the image
58     *
59     * @return integer
60     */
61    abstract public function getPixelHeight();
62
63    /**
64     * get the width in pixels of the image
65     *
66     * @return integer
67     */
68    abstract public function getPixelWidth();
69
70    /**
71     * gets an associative array of information about an image
72     *
73     * @return array
74     */
75    abstract public function getProperties();
76}
77