| Total Complexity | 8 |
| Total Lines | 95 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class MaskPosition |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin". |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $point; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing |
||
| 24 | * -1.0 will place mask just to the left of the default mask position. |
||
| 25 | * |
||
| 26 | * @var float number |
||
| 27 | */ |
||
| 28 | private $x_shift; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will |
||
| 32 | * place the mask just below the default mask position. |
||
| 33 | * |
||
| 34 | * @var float number |
||
| 35 | */ |
||
| 36 | private $y_shift; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Mask scaling coefficient. For example, 2.0 means double size. |
||
| 40 | * |
||
| 41 | * @var float number |
||
| 42 | */ |
||
| 43 | private $scale; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getPoint(): string |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $point |
||
| 55 | */ |
||
| 56 | public function setPoint(string $point): void |
||
| 57 | { |
||
| 58 | $this->point = $point; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return float |
||
| 63 | */ |
||
| 64 | public function getXShift(): float |
||
| 65 | { |
||
| 66 | return $this->x_shift; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param float $x_shift |
||
| 71 | */ |
||
| 72 | public function setXShift(float $x_shift): void |
||
| 73 | { |
||
| 74 | $this->x_shift = $x_shift; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return float |
||
| 79 | */ |
||
| 80 | public function getYShift(): float |
||
| 81 | { |
||
| 82 | return $this->y_shift; |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @param float $y_shift |
||
| 87 | */ |
||
| 88 | public function setYShift(float $y_shift): void |
||
| 89 | { |
||
| 90 | $this->y_shift = $y_shift; |
||
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * @return float |
||
| 95 | */ |
||
| 96 | public function getScale(): float |
||
| 97 | { |
||
| 98 | return $this->scale; |
||
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * @param float $scale |
||
| 103 | */ |
||
| 104 | public function setScale(float $scale): void |
||
| 107 | } |
||
| 108 | |||
| 109 | } |