1: <?php
2:
3: /**
4: * This file contains the cHTMLCanvas class.
5: *
6: * @package Core
7: * @subpackage GUI_HTML
8: * @version SVN Revision $Rev:$
9: *
10: * @author Simon Sprankel
11: * @copyright four for business AG <www.4fb.de>
12: * @license http://www.contenido.org/license/LIZENZ.txt
13: * @link http://www.4fb.de
14: * @link http://www.contenido.org
15: */
16:
17: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
18:
19: /**
20: * cHTMLCanvas class can be used for creating graphics.
21: *
22: * @package Core
23: * @subpackage GUI_HTML
24: */
25: class cHTMLCanvas extends cHTMLContentElement {
26:
27: /**
28: * Constructor.
29: *
30: * @param mixed $content [optional]
31: * String or object with the contents
32: * @param string $class [optional]
33: * the class of this element
34: * @param string $id [optional]
35: * the ID of this element
36: */
37: public function __construct($content = '', $class = '', $id = '') {
38: parent::__construct($content, $class, $id);
39: $this->_tag = 'canvas';
40: }
41:
42: /**
43: *
44: * @param unknown_type $height
45: */
46: public function setHeight($height) {
47: $this->setAttribute('height', $height);
48: }
49:
50: /**
51: *
52: * @param unknown_type $width
53: */
54: public function setWidth($width) {
55: $this->setAttribute('width', $width);
56: }
57:
58: }
59: