Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
MultiColumnLayout
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\HtmlToPdf\Layout;
6
7use Phpdftk\Css\Value\Color;
8
9/**
10 * Resolved multi-column container layout — populated by
11 * {@see BlockLayout::layoutMultiColumn()} when a box's cascade declares
12 * `column-count` and/or `column-width` non-`auto`.
13 *
14 * The painter reads this to draw `column-rule` strokes between adjacent
15 * columns (CSS Multi-column 1 §3). The geometry is recorded relative to
16 * the container's content edge: column 0 starts at `box.geometry.x`, each
17 * subsequent column at `x + i * (columnWidth + columnGap)`.
18 */
19final readonly class MultiColumnLayout
20{
21    public function __construct(
22        public int $columnCount,
23        public float $columnWidth,
24        public float $columnGap,
25        public float $ruleWidth,
26        public string $ruleStyle,
27        public ?Color $ruleColor,
28    ) {}
29}