first commit
This commit is contained in:
41
vendor/bacon/bacon-qr-code/src/Renderer/Path/Move.php
vendored
Normal file
41
vendor/bacon/bacon-qr-code/src/Renderer/Path/Move.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace BaconQrCode\Renderer\Path;
|
||||
|
||||
final class Move implements OperationInterface
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $x;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $y;
|
||||
|
||||
public function __construct(float $x, float $y)
|
||||
{
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
}
|
||||
|
||||
public function getX() : float
|
||||
{
|
||||
return $this->x;
|
||||
}
|
||||
|
||||
public function getY() : float
|
||||
{
|
||||
return $this->y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public function translate(float $x, float $y) : OperationInterface
|
||||
{
|
||||
return new self($this->x + $x, $this->y + $y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user