Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Matrix
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
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
 toMatrix
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\Svg\Value\Transform;
6
7use Phpdftk\Svg\Value\TransformFunction;
8
9/**
10 * `matrix(a, b, c, d, e, f)` — the most general form. Coordinates are SVG's
11 * column-major affine convention (e/f are the translation column).
12 */
13final class Matrix implements TransformFunction
14{
15    public function __construct(
16        public readonly float $a,
17        public readonly float $b,
18        public readonly float $c,
19        public readonly float $d,
20        public readonly float $e,
21        public readonly float $f,
22    ) {}
23
24    public function toMatrix(): array
25    {
26        return [$this->a, $this->b, $this->c, $this->d, $this->e, $this->f];
27    }
28}