| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Class AlignmentPattern |
| 5 |
* |
| 6 |
* @created 17.01.2021 |
| 7 |
* @author ZXing Authors |
| 8 |
* @author Smiley <[email protected]> |
| 9 |
* @copyright 2021 Smiley |
| 10 |
* @license Apache-2.0 |
| 11 |
*/ |
| 12 |
namespace WCPOS\Vendor\chillerlan\QRCode\Detector; |
| 13 |
|
| 14 |
/** |
| 15 |
* Encapsulates an alignment pattern, which are the smaller square patterns found in |
| 16 |
* all but the simplest QR Codes. |
| 17 |
* |
| 18 |
* @author Sean Owen |
| 19 |
*/ |
| 20 |
final class AlignmentPattern extends ResultPoint |
| 21 |
{ |
| 22 |
/** |
| 23 |
* Combines this object's current estimate of a finder pattern position and module size |
| 24 |
* with a new estimate. It returns a new FinderPattern containing an average of the two. |
| 25 |
*/ |
| 26 |
public function combineEstimate(float $i, float $j, float $newModuleSize) : self |
| 27 |
{ |
| 28 |
return new self(($this->x + $j) / 2.0, ($this->y + $i) / 2.0, ($this->estimatedModuleSize + $newModuleSize) / 2.0); |
| 29 |
} |
| 30 |
} |
| 31 |
|