| Total Complexity | 1 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class MaskPositionType |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $point; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. |
||
| 23 | * For example, choosing -1.0 will place mask just to the left of the default mask position. |
||
| 24 | * |
||
| 25 | * @var float |
||
| 26 | */ |
||
| 27 | public $xShift; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. |
||
| 31 | * For example, 1.0 will place the mask just below the default mask position. |
||
| 32 | * |
||
| 33 | * @var float |
||
| 34 | */ |
||
| 35 | public $yShift; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Mask scaling coefficient. For example, 2.0 means double size. |
||
| 39 | * |
||
| 40 | * @var float |
||
| 41 | */ |
||
| 42 | public $scale; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $point |
||
| 46 | * @param float $xShift |
||
| 47 | * @param float $yShift |
||
| 48 | * @param float $scale |
||
| 49 | * |
||
| 50 | * @return MaskPositionType |
||
| 51 | */ |
||
| 52 | public static function create(string $point, float $xShift, float $yShift, float $scale): MaskPositionType |
||
| 63 |