Gradient.php
858 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types = 1);
namespace BaconQrCode\Renderer\RendererStyle;
use BaconQrCode\Renderer\Color\ColorInterface;
final class Gradient
{
/**
* @var ColorInterface
*/
private $startColor;
/**
* @var ColorInterface
*/
private $endColor;
/**
* @var GradientType
*/
private $type;
public function __construct(ColorInterface $startColor, ColorInterface $endColor, GradientType $type)
{
$this->startColor = $startColor;
$this->endColor = $endColor;
$this->type = $type;
}
public function getStartColor() : ColorInterface
{
return $this->startColor;
}
public function getEndColor() : ColorInterface
{
return $this->endColor;
}
public function getType() : GradientType
{
return $this->type;
}
}