예제 #1
0
 /**
  * Update coordinates
  *
  * @access private
  */
 function _updateCoords()
 {
     parent::_updateCoords();
     $parent = is_object($this->_parent) ? get_class($this->_parent) : $this->_parent;
     if (strtolower($parent) == 'image_graph_plotarea') {
         $w = $this->_width();
         $h = $this->_height();
         if ($this->_alignment === false) {
             $this->_alignment = IMAGE_GRAPH_ALIGN_TOP + IMAGE_GRAPH_ALIGN_RIGHT;
         }
         if (($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) != 0) {
             $y = $this->_parent->_fillBottom() - $h - $this->_padding['bottom'];
         } else {
             $y = $this->_parent->_fillTop() + $this->_padding['top'];
         }
         if (($this->_alignment & IMAGE_GRAPH_ALIGN_LEFT) != 0) {
             $x = $this->_parent->_fillLeft() + $this->_padding['left'];
         } else {
             $x = $this->_parent->_fillRight() - $w - $this->_padding['right'];
         }
         $this->_setCoords($x, $y, $x + $w, $y + $h);
     }
 }
예제 #2
0
 /**
  * Update coordinates
  *
  * @access private
  */
 function _updateCoords()
 {
     for ($i = 0; $i < $this->_rows; $i++) {
         for ($j = 0; $j < $this->_cols; $j++) {
             $element =& $this->getEntry($i, $j);
             $this->add($element);
         }
     }
     parent::_updateCoords();
 }