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
9 namespace Dompdf\Positioner
;
11 use Dompdf\FrameDecorator\AbstractFrameDecorator
;
14 * Positions block frames
19 class Block
extends AbstractPositioner
{
22 function __construct(AbstractFrameDecorator
$frame)
24 parent
::__construct($frame);
27 //........................................................................
31 $frame = $this->_frame
;
32 $style = $frame->get_style();
33 $cb = $frame->get_containing_block();
34 $p = $frame->find_block_parent();
37 $float = $style->float;
39 if (!$float ||
$float === "none") {
42 $y = $p->get_current_line_box()->y
;
50 // Relative positionning
51 if ($style->position
=== "relative") {
52 $top = $style->length_in_pt($style->top
, $cb["h"]);
53 //$right = $style->length_in_pt($style->right, $cb["w"]);
54 //$bottom = $style->length_in_pt($style->bottom, $cb["h"]);
55 $left = $style->length_in_pt($style->left
, $cb["w"]);
61 $frame->set_position($x, $y);