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