示例#1
0
 /**
  * The height of the element on the canvas
  *
  * @return int Number of pixels representing the height of the element
  * @access private
  */
 function _height()
 {
     $parent = is_object($this->_parent) ? get_class($this->_parent) : $this->_parent;
     if (strtolower($parent) == 'image_graph_plotarea') {
         $param = $this->_parameterArray(true);
         $param['align'] = IMAGE_GRAPH_ALIGN_VERTICAL;
         $param0 = $param;
         $keys = array_keys($this->_plotareas);
         foreach ($keys as $key) {
             $plotarea =& $this->_plotareas[$key];
             $keys2 = array_keys($plotarea->_elements);
             foreach ($keys2 as $key) {
                 $element =& $plotarea->_elements[$key];
                 if (is_a($element, 'Image_Graph_Plot')) {
                     $element->_legendSample($param);
                 }
             }
             unset($keys2);
         }
         unset($keys);
         return abs($param['y'] - $param0['y']) + $this->_padding['top'] + $this->_padding['bottom'];
     } else {
         return parent::height();
     }
 }