Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| NestedSvg | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Svg; |
| 6 | |
| 7 | /** |
| 8 | * A nested `<svg>` element (an `<svg>` that is not the document root). |
| 9 | * |
| 10 | * SVG 2 §7.5 — a nested `<svg>` establishes a new viewport (from its |
| 11 | * `x` / `y` / `width` / `height`) and, when it carries a `viewBox`, a new |
| 12 | * user coordinate system for its children (with the viewBox-to-viewport |
| 13 | * scale + `preserveAspectRatio` alignment). Overflow is clipped to the |
| 14 | * viewport by default. The root `<svg>` is {@see SvgDocument}; both share |
| 15 | * the viewBox machinery in {@see ViewportElement}. |
| 16 | */ |
| 17 | final class NestedSvg extends ViewportElement |
| 18 | { |
| 19 | public function __construct() |
| 20 | { |
| 21 | parent::__construct('svg'); |
| 22 | } |
| 23 | } |