PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / vendor_prefixed / chillerlan / php-qrcode / src / Common / LuminanceSourceInterface.php

LuminanceSourceInterface.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.18, at vendor_prefixed/chillerlan/php-qrcode/src/Common/LuminanceSourceInterface.php

56 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Interface LuminanceSourceInterface
5 *
6 * @created 18.11.2021
7 * @author smiley <smiley@chillerlan.net>
8 * @copyright 2021 smiley
9 * @license MIT
10 */
11 namespace WCPOS\Vendor\chillerlan\QRCode\Common;
12
13 /**
14 */
15 interface LuminanceSourceInterface
16 {
17 /**
18 * Fetches luminance data for the underlying bitmap. Values should be fetched using:
19 * `int luminance = array[y * width + x] & 0xff`
20 *
21 * @return array A row-major 2D array of luminance values. Do not use result $length as it may be
22 * larger than $width * $height bytes on some platforms. Do not modify the contents
23 * of the result.
24 */
25 public function getLuminances() : array;
26 /**
27 * @return int The width of the bitmap.
28 */
29 public function getWidth() : int;
30 /**
31 * @return int The height of the bitmap.
32 */
33 public function getHeight() : int;
34 /**
35 * Fetches one row of luminance data from the underlying platform's bitmap. Values range from
36 * 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
37 * to bitwise and with 0xff for each value. It is preferable for implementations of this method
38 * to only fetch this row rather than the whole image, since no 2D Readers may be installed and
39 * getLuminances() may never be called.
40 *
41 * @param int $y The row to fetch, which must be in [0,getHeight())
42 *
43 * @return array An array containing the luminance data.
44 * @throws \chillerlan\QRCode\Decoder\QRCodeDecoderException
45 */
46 public function getRow(int $y) : array;
47 /**
48 * Creates a LuminanceSource instance from the given file
49 */
50 public static function fromFile(string $path) : self;
51 /**
52 * Creates a LuminanceSource instance from the given data blob
53 */
54 public static function fromBlob(string $blob) : self;
55 }
56