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
TableRenderContext
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\Pdf\Writer;
6
7use Phpdftk\FontMetrics\AfmData;
8
9/**
10 * Rendering context passed to {@see TableRenderer}. Bundles the body /
11 * header font handles plus their metrics so the renderer doesn't need
12 * to know how the caller resolved fonts.
13 */
14final class TableRenderContext
15{
16    public function __construct(
17        public readonly Font $bodyFont,
18        public readonly AfmData $bodyMetrics,
19        public readonly Font $headerFont,
20        public readonly AfmData $headerMetrics,
21        public readonly float $fontSize,
22        public readonly float $lineHeight,
23        public readonly TableStyle $style,
24    ) {}
25}