Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
4 / 4
CRAP
100.00% covered (success)
100.00%
1 / 1
FePointLight
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
4 / 4
4
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
 x
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 y
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 z
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\Filter;
6
7use Phpdftk\Svg\Element;
8
9/**
10 * SVG 2 Filter Effects §15.15.2 — `<fePointLight>`. Position
11 * source for `<feDiffuseLighting>` / `<feSpecularLighting>`.
12 * Emits light isotropically from a single point.
13 *
14 *   x, y, z: position in filter coordinates (defaults 0)
15 */
16final class FePointLight extends Element
17{
18    public function __construct()
19    {
20        parent::__construct('fePointLight');
21    }
22
23    public function x(): float
24    {
25        return (float) ($this->getAttribute('x') ?? 0);
26    }
27
28    public function y(): float
29    {
30        return (float) ($this->getAttribute('y') ?? 0);
31    }
32
33    public function z(): float
34    {
35        return (float) ($this->getAttribute('z') ?? 0);
36    }
37}