chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html 42 KB

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