table_row_positioner.cls.php 780 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @package dompdf
  4. * @link http://dompdf.github.com/
  5. * @author Benj Carson <benjcarson@digitaljunkies.ca>
  6. * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
  7. */
  8. /**
  9. * Positions table rows
  10. *
  11. * @access private
  12. * @package dompdf
  13. */
  14. class Table_Row_Positioner extends Positioner {
  15. function __construct(Frame_Decorator $frame) { parent::__construct($frame); }
  16. //........................................................................
  17. function position() {
  18. $cb = $this->_frame->get_containing_block();
  19. $p = $this->_frame->get_prev_sibling();
  20. if ( $p )
  21. $y = $p->get_position("y") + $p->get_margin_height();
  22. else
  23. $y = $cb["y"];
  24. $this->_frame->set_position($cb["x"], $y);
  25. }
  26. }