chillerlan-QRCode-Decoder-LuminanceSourceAbstract.html 41 KB

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