chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html 41 KB

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