chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. LuminanceSourceAbstract
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. <span class="phpdocumentor-element__implements">
  96. implements
  97. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a> </span>
  98. </h2>
  99. <aside class="phpdocumentor-element-found-in">
  100. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  101. :
  102. <span class="phpdocumentor-element-found-in__line">26</span>
  103. </aside>
  104. <p class="phpdocumentor-summary">The purpose of this class hierarchy is to abstract different bitmap implementations across
  105. platforms into a standard interface for requesting greyscale luminance values. The interface
  106. only provides immutable methods; therefore crop and rotation create copies. This is to ensure
  107. that one Reader does not modify the original luminance source and leave it in an unknown state
  108. for other Readers in the chain.</p>
  109. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  110. Tags
  111. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  112. </h5>
  113. <dl class="phpdocumentor-tag-list">
  114. <dt class="phpdocumentor-tag-list__entry">
  115. <span class="phpdocumentor-tag__name">author</span>
  116. </dt>
  117. <dd class="phpdocumentor-tag-list__definition">
  118. <section class="phpdocumentor-description"><p>dswitkin@google.com (Daniel Switkin)</p>
  119. </section>
  120. </dd>
  121. </dl>
  122. <h3 id="interfaces_class_traits">
  123. Interfaces, Classes and Traits
  124. <a href="#interfaces_class_traits" class="headerlink"><i class="fas fa-link"></i></a>
  125. </h3>
  126. <dl class="phpdocumentor-table-of-contents">
  127. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Decoder\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></dt>
  128. <dd></dd>
  129. </dl>
  130. <h3 id="toc">
  131. Table of Contents
  132. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  133. </h3>
  134. <dl class="phpdocumentor-table-of-contents">
  135. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  136. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_height">$height</a>
  137. <span>
  138. &nbsp;: int </span>
  139. </dt>
  140. <dd></dd>
  141. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  142. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_luminances">$luminances</a>
  143. <span>
  144. &nbsp;: array&lt;string|int, mixed&gt; </span>
  145. </dt>
  146. <dd></dd>
  147. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  148. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_width">$width</a>
  149. <span>
  150. &nbsp;: int </span>
  151. </dt>
  152. <dd></dd>
  153. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  154. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method___construct">__construct()</a>
  155. <span>
  156. &nbsp;: mixed </span>
  157. </dt>
  158. <dd></dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a>
  161. <span>
  162. &nbsp;: int </span>
  163. </dt>
  164. <dd></dd>
  165. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  166. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getMatrix">getMatrix()</a>
  167. <span>
  168. &nbsp;: array&lt;string|int, mixed&gt; </span>
  169. </dt>
  170. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  171. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getRow">getRow()</a>
  174. <span>
  175. &nbsp;: array&lt;string|int, mixed&gt; </span>
  176. </dt>
  177. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  178. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  179. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  180. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  181. getMatrix() may never be called.</dd>
  182. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  183. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a>
  184. <span>
  185. &nbsp;: int </span>
  186. </dt>
  187. <dd></dd>
  188. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  189. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a>
  190. <span>
  191. &nbsp;: string </span>
  192. </dt>
  193. <dd></dd>
  194. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  195. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a>
  196. <span>
  197. &nbsp;: void </span>
  198. </dt>
  199. <dd></dd>
  200. </dl>
  201. <section class="phpdocumentor-properties">
  202. <h3 class="phpdocumentor-elements__header" id="properties">
  203. Properties
  204. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  205. </h3>
  206. <article
  207. class="
  208. phpdocumentor-element
  209. -property
  210. -protected
  211. "
  212. >
  213. <h4 class="phpdocumentor-element__name" id="property_height">
  214. $height
  215. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_height" class="headerlink"><i class="fas fa-link"></i></a>
  216. <span class="phpdocumentor-element__modifiers">
  217. </span>
  218. </h4>
  219. <aside class="phpdocumentor-element-found-in">
  220. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  221. :
  222. <span class="phpdocumentor-element-found-in__line">30</span>
  223. </aside>
  224. <code class="phpdocumentor-code phpdocumentor-signature ">
  225. <span class="phpdocumentor-signature__visibility">protected</span>
  226. <span class="phpdocumentor-signature__type">int</span>
  227. <span class="phpdocumentor-signature__name">$height</span>
  228. </code>
  229. <section class="phpdocumentor-description"></section>
  230. <section class="phpdocumentor-description"></section>
  231. </article>
  232. <article
  233. class="
  234. phpdocumentor-element
  235. -property
  236. -protected
  237. "
  238. >
  239. <h4 class="phpdocumentor-element__name" id="property_luminances">
  240. $luminances
  241. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_luminances" class="headerlink"><i class="fas fa-link"></i></a>
  242. <span class="phpdocumentor-element__modifiers">
  243. </span>
  244. </h4>
  245. <aside class="phpdocumentor-element-found-in">
  246. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  247. :
  248. <span class="phpdocumentor-element-found-in__line">28</span>
  249. </aside>
  250. <code class="phpdocumentor-code phpdocumentor-signature ">
  251. <span class="phpdocumentor-signature__visibility">protected</span>
  252. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  253. <span class="phpdocumentor-signature__name">$luminances</span>
  254. </code>
  255. <section class="phpdocumentor-description"></section>
  256. <section class="phpdocumentor-description"></section>
  257. </article>
  258. <article
  259. class="
  260. phpdocumentor-element
  261. -property
  262. -protected
  263. "
  264. >
  265. <h4 class="phpdocumentor-element__name" id="property_width">
  266. $width
  267. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#property_width" class="headerlink"><i class="fas fa-link"></i></a>
  268. <span class="phpdocumentor-element__modifiers">
  269. </span>
  270. </h4>
  271. <aside class="phpdocumentor-element-found-in">
  272. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  273. :
  274. <span class="phpdocumentor-element-found-in__line">29</span>
  275. </aside>
  276. <code class="phpdocumentor-code phpdocumentor-signature ">
  277. <span class="phpdocumentor-signature__visibility">protected</span>
  278. <span class="phpdocumentor-signature__type">int</span>
  279. <span class="phpdocumentor-signature__name">$width</span>
  280. </code>
  281. <section class="phpdocumentor-description"></section>
  282. <section class="phpdocumentor-description"></section>
  283. </article>
  284. </section>
  285. <section class="phpdocumentor-methods">
  286. <h3 class="phpdocumentor-elements__header" id="methods">
  287. Methods
  288. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  289. </h3>
  290. <article
  291. class="phpdocumentor-element
  292. -method
  293. -public
  294. "
  295. >
  296. <h4 class="phpdocumentor-element__name" id="method___construct">
  297. __construct()
  298. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  299. </h4>
  300. <aside class="phpdocumentor-element-found-in">
  301. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  302. :
  303. <span class="phpdocumentor-element-found-in__line">35</span>
  304. </aside>
  305. <code class="phpdocumentor-code phpdocumentor-signature ">
  306. <span class="phpdocumentor-signature__visibility">public</span>
  307. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$width</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$height</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  308. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  309. <dl class="phpdocumentor-argument-list">
  310. <dt class="phpdocumentor-argument-list__entry">
  311. <span class="phpdocumentor-signature__argument__name">$width</span>
  312. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  313. </dt>
  314. <dd class="phpdocumentor-argument-list__definition">
  315. <section class="phpdocumentor-description"></section>
  316. </dd>
  317. <dt class="phpdocumentor-argument-list__entry">
  318. <span class="phpdocumentor-signature__argument__name">$height</span>
  319. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  320. </dt>
  321. <dd class="phpdocumentor-argument-list__definition">
  322. <section class="phpdocumentor-description"></section>
  323. </dd>
  324. </dl>
  325. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  326. <span class="phpdocumentor-signature__response_type">mixed</span>
  327. &mdash;
  328. </article>
  329. <article
  330. class="phpdocumentor-element
  331. -method
  332. -public
  333. "
  334. >
  335. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  336. getHeight()
  337. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  338. </h4>
  339. <aside class="phpdocumentor-element-found-in">
  340. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  341. :
  342. <span class="phpdocumentor-element-found-in__line">54</span>
  343. </aside>
  344. <code class="phpdocumentor-code phpdocumentor-signature ">
  345. <span class="phpdocumentor-signature__visibility">public</span>
  346. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  347. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  348. Tags
  349. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  350. </h5>
  351. <dl class="phpdocumentor-tag-list">
  352. <dt class="phpdocumentor-tag-list__entry">
  353. <span class="phpdocumentor-tag__name">inheritDoc</span>
  354. </dt>
  355. <dd class="phpdocumentor-tag-list__definition">
  356. </dd>
  357. </dl>
  358. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  359. <span class="phpdocumentor-signature__response_type">int</span>
  360. &mdash;
  361. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  362. </section>
  363. </article>
  364. <article
  365. class="phpdocumentor-element
  366. -method
  367. -public
  368. "
  369. >
  370. <h4 class="phpdocumentor-element__name" id="method_getMatrix">
  371. getMatrix()
  372. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getMatrix" class="headerlink"><i class="fas fa-link"></i></a>
  373. </h4>
  374. <aside class="phpdocumentor-element-found-in">
  375. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  376. :
  377. <span class="phpdocumentor-element-found-in__line">44</span>
  378. </aside>
  379. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  380. `int luminance = array[y * width + x] &amp; 0xff`</p>
  381. <code class="phpdocumentor-code phpdocumentor-signature ">
  382. <span class="phpdocumentor-signature__visibility">public</span>
  383. <span class="phpdocumentor-signature__name">getMatrix</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  384. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  385. Tags
  386. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  387. </h5>
  388. <dl class="phpdocumentor-tag-list">
  389. <dt class="phpdocumentor-tag-list__entry">
  390. <span class="phpdocumentor-tag__name">inheritDoc</span>
  391. </dt>
  392. <dd class="phpdocumentor-tag-list__definition">
  393. </dd>
  394. </dl>
  395. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  396. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  397. &mdash;
  398. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result.length as it may be
  399. larger than width * height bytes on some platforms. Do not modify the contents
  400. of the result.</p>
  401. </section>
  402. </article>
  403. <article
  404. class="phpdocumentor-element
  405. -method
  406. -public
  407. "
  408. >
  409. <h4 class="phpdocumentor-element__name" id="method_getRow">
  410. getRow()
  411. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  412. </h4>
  413. <aside class="phpdocumentor-element-found-in">
  414. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  415. :
  416. <span class="phpdocumentor-element-found-in__line">59</span>
  417. </aside>
  418. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  419. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  420. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  421. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  422. getMatrix() may never be called.</p>
  423. <code class="phpdocumentor-code phpdocumentor-signature ">
  424. <span class="phpdocumentor-signature__visibility">public</span>
  425. <span class="phpdocumentor-signature__name">getRow</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  426. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  427. <dl class="phpdocumentor-argument-list">
  428. <dt class="phpdocumentor-argument-list__entry">
  429. <span class="phpdocumentor-signature__argument__name">$y</span>
  430. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  431. </dt>
  432. <dd class="phpdocumentor-argument-list__definition">
  433. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  434. </section>
  435. </dd>
  436. </dl>
  437. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  438. Tags
  439. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  440. </h5>
  441. <dl class="phpdocumentor-tag-list">
  442. <dt class="phpdocumentor-tag-list__entry">
  443. <span class="phpdocumentor-tag__name">inheritDoc</span>
  444. </dt>
  445. <dd class="phpdocumentor-tag-list__definition">
  446. </dd>
  447. </dl>
  448. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  449. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  450. &mdash;
  451. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  452. </section>
  453. </article>
  454. <article
  455. class="phpdocumentor-element
  456. -method
  457. -public
  458. "
  459. >
  460. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  461. getWidth()
  462. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  463. </h4>
  464. <aside class="phpdocumentor-element-found-in">
  465. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  466. :
  467. <span class="phpdocumentor-element-found-in__line">49</span>
  468. </aside>
  469. <code class="phpdocumentor-code phpdocumentor-signature ">
  470. <span class="phpdocumentor-signature__visibility">public</span>
  471. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  472. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  473. Tags
  474. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  475. </h5>
  476. <dl class="phpdocumentor-tag-list">
  477. <dt class="phpdocumentor-tag-list__entry">
  478. <span class="phpdocumentor-tag__name">inheritDoc</span>
  479. </dt>
  480. <dd class="phpdocumentor-tag-list__definition">
  481. </dd>
  482. </dl>
  483. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  484. <span class="phpdocumentor-signature__response_type">int</span>
  485. &mdash;
  486. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  487. </section>
  488. </article>
  489. <article
  490. class="phpdocumentor-element
  491. -method
  492. -protected
  493. -static "
  494. >
  495. <h4 class="phpdocumentor-element__name" id="method_checkFile">
  496. checkFile()
  497. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_checkFile" class="headerlink"><i class="fas fa-link"></i></a>
  498. </h4>
  499. <aside class="phpdocumentor-element-found-in">
  500. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  501. :
  502. <span class="phpdocumentor-element-found-in__line">86</span>
  503. </aside>
  504. <code class="phpdocumentor-code phpdocumentor-signature ">
  505. <span class="phpdocumentor-signature__visibility">protected</span>
  506. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">checkFile</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$path</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  507. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  508. <dl class="phpdocumentor-argument-list">
  509. <dt class="phpdocumentor-argument-list__entry">
  510. <span class="phpdocumentor-signature__argument__name">$path</span>
  511. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  512. </dt>
  513. <dd class="phpdocumentor-argument-list__definition">
  514. <section class="phpdocumentor-description"></section>
  515. </dd>
  516. </dl>
  517. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  518. <span class="phpdocumentor-signature__response_type">string</span>
  519. &mdash;
  520. </article>
  521. <article
  522. class="phpdocumentor-element
  523. -method
  524. -protected
  525. "
  526. >
  527. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixel">
  528. setLuminancePixel()
  529. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#method_setLuminancePixel" class="headerlink"><i class="fas fa-link"></i></a>
  530. </h4>
  531. <aside class="phpdocumentor-element-found-in">
  532. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceAbstract.php"><a href="files/src-decoder-luminancesourceabstract.html"><abbr title="src/Decoder/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  533. :
  534. <span class="phpdocumentor-element-found-in__line">75</span>
  535. </aside>
  536. <code class="phpdocumentor-code phpdocumentor-signature ">
  537. <span class="phpdocumentor-signature__visibility">protected</span>
  538. <span class="phpdocumentor-signature__name">setLuminancePixel</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$r</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$g</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  539. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  540. <dl class="phpdocumentor-argument-list">
  541. <dt class="phpdocumentor-argument-list__entry">
  542. <span class="phpdocumentor-signature__argument__name">$r</span>
  543. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  544. </dt>
  545. <dd class="phpdocumentor-argument-list__definition">
  546. <section class="phpdocumentor-description"></section>
  547. </dd>
  548. <dt class="phpdocumentor-argument-list__entry">
  549. <span class="phpdocumentor-signature__argument__name">$g</span>
  550. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  551. </dt>
  552. <dd class="phpdocumentor-argument-list__definition">
  553. <section class="phpdocumentor-description"></section>
  554. </dd>
  555. <dt class="phpdocumentor-argument-list__entry">
  556. <span class="phpdocumentor-signature__argument__name">$b</span>
  557. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  558. </dt>
  559. <dd class="phpdocumentor-argument-list__definition">
  560. <section class="phpdocumentor-description"></section>
  561. </dd>
  562. </dl>
  563. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  564. <span class="phpdocumentor-signature__response_type">void</span>
  565. &mdash;
  566. </article>
  567. </section>
  568. <script type="text/javascript">
  569. function loadExternalCodeSnippets(line) {
  570. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  571. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  572. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  573. var language = 'php';
  574. var code = document.createElement('code');
  575. code.className = 'language-' + language;
  576. pre.textContent = '';
  577. pre.setAttribute('data-line', line)
  578. code.textContent = 'Loading…';
  579. pre.appendChild(code);
  580. var xhr = new XMLHttpRequest();
  581. xhr.open('GET', src, true);
  582. xhr.onreadystatechange = function () {
  583. if (xhr.readyState == 4) {
  584. if (xhr.status < 400 && xhr.responseText) {
  585. code.textContent = xhr.responseText;
  586. Prism.highlightElement(code);
  587. }
  588. else if (xhr.status >= 400) {
  589. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  590. }
  591. else {
  592. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  593. }
  594. }
  595. };
  596. xhr.send(null);
  597. });
  598. }
  599. var modals = document.querySelectorAll("[data-modal]");
  600. modals.forEach(function (trigger) {
  601. trigger.addEventListener("click", function (event) {
  602. //event.preventDefault();
  603. const modal = document.getElementById(trigger.dataset.modal);
  604. modal.classList.add("phpdocumentor-modal__open");
  605. loadExternalCodeSnippets(trigger.dataset.line)
  606. const exits = modal.querySelectorAll("[data-exit-button]");
  607. exits.forEach(function (exit) {
  608. exit.addEventListener("click", function (event) {
  609. event.preventDefault();
  610. modal.classList.remove("phpdocumentor-modal__open");
  611. });
  612. });
  613. });
  614. });
  615. </script>
  616. </article>
  617. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  618. <section class="phpdocumentor-search-results__dialog">
  619. <header class="phpdocumentor-search-results__header">
  620. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  621. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  622. </header>
  623. <section class="phpdocumentor-search-results__body">
  624. <ul class="phpdocumentor-search-results__entries"></ul>
  625. </section>
  626. </section>
  627. </section>
  628. </div>
  629. </div>
  630. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  631. </main>
  632. <script>
  633. cssVars({});
  634. </script>
  635. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  636. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  637. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  638. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  639. </body>
  640. </html>