chillerlan-QRCode-Common-LuminanceSourceInterface.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  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=Open+Sans:wght@100;200;300;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/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. <li class="phpdocumentor-topnav__menu-item -social">
  59. <a href="https://github.com/chillerlan/php-qrcode/discussions">
  60. <span>
  61. <i class="fas fa-envelope-open-text"></i>
  62. </span>
  63. </a>
  64. </li>
  65. </ul>
  66. </nav>
  67. </header>
  68. <main class="phpdocumentor">
  69. <div class="phpdocumentor-section">
  70. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  71. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  72. Menu
  73. </label>
  74. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  75. <section class="phpdocumentor-sidebar__category -namespaces">
  76. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  77. <h4 class="phpdocumentor-sidebar__root-namespace">
  78. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  79. </h4>
  80. <ul class="phpdocumentor-list">
  81. <li>
  82. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  83. </li>
  84. <li>
  85. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  86. </li>
  87. </ul>
  88. </section>
  89. <section class="phpdocumentor-sidebar__category -packages">
  90. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  91. <h4 class="phpdocumentor-sidebar__root-namespace">
  92. <a href="packages/Application.html" class="">Application</a>
  93. </h4>
  94. </section>
  95. <section class="phpdocumentor-sidebar__category -reports">
  96. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  97. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  98. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  100. </section>
  101. <section class="phpdocumentor-sidebar__category -indices">
  102. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  103. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  104. </section>
  105. </aside>
  106. <div class="phpdocumentor-column -nine phpdocumentor-content">
  107. <section>
  108. <ul class="phpdocumentor-breadcrumbs">
  109. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  110. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  111. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  112. </ul>
  113. <article class="phpdocumentor-element -interface">
  114. <h2 class="phpdocumentor-content__title">
  115. LuminanceSourceInterface
  116. <div class="phpdocumentor-element__package">
  117. in
  118. <ul class="phpdocumentor-breadcrumbs">
  119. <li><a href="packages/Application.html">Application</a></li>
  120. </ul>
  121. </div>
  122. </h2>
  123. <aside class="phpdocumentor-element-found-in">
  124. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  125. :
  126. <span class="phpdocumentor-element-found-in__line">20</span>
  127. </aside>
  128. <p class="phpdocumentor-summary">Interface for the luminance sources</p>
  129. <h3 id="toc">
  130. Table of Contents
  131. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  132. </h3>
  133. <h4 id="toc-methods">
  134. Methods
  135. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  136. </h4>
  137. <dl class="phpdocumentor-table-of-contents">
  138. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  139. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromBlob">fromBlob()</a>
  140. <span>
  141. &nbsp;: static </span>
  142. </dt>
  143. <dd>Creates a LuminanceSource instance from the given data blob</dd>
  144. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  145. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromFile">fromFile()</a>
  146. <span>
  147. &nbsp;: static </span>
  148. </dt>
  149. <dd>Creates a LuminanceSource instance from the given file</dd>
  150. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  151. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getHeight">getHeight()</a>
  152. <span>
  153. &nbsp;: int </span>
  154. </dt>
  155. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  156. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getLuminances">getLuminances()</a>
  157. <span>
  158. &nbsp;: array&lt;string|int, int&gt; </span>
  159. </dt>
  160. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  161. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  162. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  163. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getRow">getRow()</a>
  164. <span>
  165. &nbsp;: array&lt;string|int, int&gt; </span>
  166. </dt>
  167. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  168. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  169. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  170. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  171. getLuminances() may never be called.</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a class="" href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getWidth">getWidth()</a>
  174. <span>
  175. &nbsp;: int </span>
  176. </dt>
  177. </dl>
  178. <section class="phpdocumentor-methods">
  179. <h3 class="phpdocumentor-elements__header" id="methods">
  180. Methods
  181. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  182. </h3>
  183. <article
  184. class="phpdocumentor-element
  185. -method
  186. -public
  187. -static "
  188. >
  189. <h4 class="phpdocumentor-element__name" id="method_fromBlob">
  190. fromBlob()
  191. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromBlob" class="headerlink"><i class="fas fa-link"></i></a>
  192. </h4>
  193. <aside class="phpdocumentor-element-found-in">
  194. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  195. :
  196. <span class="phpdocumentor-element-found-in__line">64</span>
  197. </aside>
  198. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given data blob</p>
  199. <code class="phpdocumentor-code phpdocumentor-signature ">
  200. <span class="phpdocumentor-signature__visibility">public</span>
  201. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fromBlob</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$blob</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>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">static</span></code>
  202. <div class="phpdocumentor-label-line">
  203. </div>
  204. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  205. <dl class="phpdocumentor-argument-list">
  206. <dt class="phpdocumentor-argument-list__entry">
  207. <span class="phpdocumentor-signature__argument__name">$blob</span>
  208. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  209. </dt>
  210. <dd class="phpdocumentor-argument-list__definition">
  211. </dd>
  212. <dt class="phpdocumentor-argument-list__entry">
  213. <span class="phpdocumentor-signature__argument__name">$options</span>
  214. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  215. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  216. <dd class="phpdocumentor-argument-list__definition">
  217. </dd>
  218. </dl>
  219. <section>
  220. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  221. <span class="phpdocumentor-signature__response_type">static</span>
  222. </section>
  223. </article>
  224. <article
  225. class="phpdocumentor-element
  226. -method
  227. -public
  228. -static "
  229. >
  230. <h4 class="phpdocumentor-element__name" id="method_fromFile">
  231. fromFile()
  232. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromFile" class="headerlink"><i class="fas fa-link"></i></a>
  233. </h4>
  234. <aside class="phpdocumentor-element-found-in">
  235. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  236. :
  237. <span class="phpdocumentor-element-found-in__line">59</span>
  238. </aside>
  239. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given file</p>
  240. <code class="phpdocumentor-code phpdocumentor-signature ">
  241. <span class="phpdocumentor-signature__visibility">public</span>
  242. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fromFile</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 class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">new QROptions()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">static</span></code>
  243. <div class="phpdocumentor-label-line">
  244. </div>
  245. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  246. <dl class="phpdocumentor-argument-list">
  247. <dt class="phpdocumentor-argument-list__entry">
  248. <span class="phpdocumentor-signature__argument__name">$path</span>
  249. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  250. </dt>
  251. <dd class="phpdocumentor-argument-list__definition">
  252. </dd>
  253. <dt class="phpdocumentor-argument-list__entry">
  254. <span class="phpdocumentor-signature__argument__name">$options</span>
  255. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr>|<a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  256. = <span class="phpdocumentor-signature__argument__default-value">new QROptions()</span> </dt>
  257. <dd class="phpdocumentor-argument-list__definition">
  258. </dd>
  259. </dl>
  260. <section>
  261. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  262. <span class="phpdocumentor-signature__response_type">static</span>
  263. </section>
  264. </article>
  265. <article
  266. class="phpdocumentor-element
  267. -method
  268. -public
  269. "
  270. >
  271. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  272. getHeight()
  273. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  274. </h4>
  275. <aside class="phpdocumentor-element-found-in">
  276. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  277. :
  278. <span class="phpdocumentor-element-found-in__line">40</span>
  279. </aside>
  280. <code class="phpdocumentor-code phpdocumentor-signature ">
  281. <span class="phpdocumentor-signature__visibility">public</span>
  282. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  283. <div class="phpdocumentor-label-line">
  284. </div>
  285. <section>
  286. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  287. <span class="phpdocumentor-signature__response_type">int</span>
  288. &mdash;
  289. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  290. </section>
  291. </section>
  292. </article>
  293. <article
  294. class="phpdocumentor-element
  295. -method
  296. -public
  297. "
  298. >
  299. <h4 class="phpdocumentor-element__name" id="method_getLuminances">
  300. getLuminances()
  301. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getLuminances" class="headerlink"><i class="fas fa-link"></i></a>
  302. </h4>
  303. <aside class="phpdocumentor-element-found-in">
  304. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  305. :
  306. <span class="phpdocumentor-element-found-in__line">30</span>
  307. </aside>
  308. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  309. `int luminance = array[y * width + x] &amp; 0xff`</p>
  310. <code class="phpdocumentor-code phpdocumentor-signature ">
  311. <span class="phpdocumentor-signature__visibility">public</span>
  312. <span class="phpdocumentor-signature__name">getLuminances</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  313. <div class="phpdocumentor-label-line">
  314. </div>
  315. <section>
  316. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  317. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  318. &mdash;
  319. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result $length as it may be
  320. larger than $width * $height bytes on some platforms. Do not modify the contents
  321. of the result.</p>
  322. </section>
  323. </section>
  324. </article>
  325. <article
  326. class="phpdocumentor-element
  327. -method
  328. -public
  329. "
  330. >
  331. <h4 class="phpdocumentor-element__name" id="method_getRow">
  332. getRow()
  333. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  334. </h4>
  335. <aside class="phpdocumentor-element-found-in">
  336. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  337. :
  338. <span class="phpdocumentor-element-found-in__line">54</span>
  339. </aside>
  340. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  341. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  342. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  343. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  344. getLuminances() may never be called.</p>
  345. <code class="phpdocumentor-code phpdocumentor-signature ">
  346. <span class="phpdocumentor-signature__visibility">public</span>
  347. <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, int&gt;</span></code>
  348. <div class="phpdocumentor-label-line">
  349. </div>
  350. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  351. <dl class="phpdocumentor-argument-list">
  352. <dt class="phpdocumentor-argument-list__entry">
  353. <span class="phpdocumentor-signature__argument__name">$y</span>
  354. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  355. </dt>
  356. <dd class="phpdocumentor-argument-list__definition">
  357. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  358. </section>
  359. </dd>
  360. </dl>
  361. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  362. Tags
  363. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getRow#tags" class="headerlink"><i class="fas fa-link"></i></a>
  364. </h5>
  365. <dl class="phpdocumentor-tag-list">
  366. <dt class="phpdocumentor-tag-list__entry">
  367. <span class="phpdocumentor-tag__name">throws</span>
  368. </dt>
  369. <dd class="phpdocumentor-tag-list__definition">
  370. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  371. </dd>
  372. </dl>
  373. <section>
  374. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  375. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  376. &mdash;
  377. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  378. </section>
  379. </section>
  380. </article>
  381. <article
  382. class="phpdocumentor-element
  383. -method
  384. -public
  385. "
  386. >
  387. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  388. getWidth()
  389. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getWidth" 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/Common/LuminanceSourceInterface.php"><a href="files/src-common-luminancesourceinterface.html"><abbr title="src/Common/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  393. :
  394. <span class="phpdocumentor-element-found-in__line">35</span>
  395. </aside>
  396. <code class="phpdocumentor-code phpdocumentor-signature ">
  397. <span class="phpdocumentor-signature__visibility">public</span>
  398. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  399. <div class="phpdocumentor-label-line">
  400. </div>
  401. <section>
  402. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  403. <span class="phpdocumentor-signature__response_type">int</span>
  404. &mdash;
  405. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  406. </section>
  407. </section>
  408. </article>
  409. </section>
  410. <div class="phpdocumentor-modal" id="source-view">
  411. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  412. <div class="phpdocumentor-modal-container">
  413. <div class="phpdocumentor-modal-content">
  414. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Common/LuminanceSourceInterface.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  415. </div>
  416. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  417. </div>
  418. </div>
  419. <script type="text/javascript">
  420. (function () {
  421. function loadExternalCodeSnippet(el, url, line) {
  422. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  423. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  424. const language = 'php';
  425. const code = document.createElement('code');
  426. code.className = 'language-' + language;
  427. pre.textContent = '';
  428. pre.setAttribute('data-line', line)
  429. code.textContent = 'Loading…';
  430. pre.appendChild(code);
  431. var xhr = new XMLHttpRequest();
  432. xhr.open('GET', src, true);
  433. xhr.onreadystatechange = function () {
  434. if (xhr.readyState !== 4) {
  435. return;
  436. }
  437. if (xhr.status < 400 && xhr.responseText) {
  438. code.textContent = xhr.responseText;
  439. Prism.highlightElement(code);
  440. return;
  441. }
  442. if (xhr.status === 404) {
  443. code.textContent = '✖ Error: File could not be found';
  444. return;
  445. }
  446. if (xhr.status >= 400) {
  447. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  448. return;
  449. }
  450. code.textContent = '✖ Error: An unknown error occurred';
  451. };
  452. xhr.send(null);
  453. });
  454. }
  455. const modalButtons = document.querySelectorAll("[data-modal]");
  456. const openedAsLocalFile = window.location.protocol === 'file:';
  457. if (modalButtons.length > 0 && openedAsLocalFile) {
  458. console.warn(
  459. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  460. 'browsers block XHR requests when a page is opened this way'
  461. );
  462. }
  463. modalButtons.forEach(function (trigger) {
  464. if (openedAsLocalFile) {
  465. trigger.setAttribute("hidden", "hidden");
  466. }
  467. trigger.addEventListener("click", function (event) {
  468. event.preventDefault();
  469. const modal = document.getElementById(trigger.dataset.modal);
  470. if (!modal) {
  471. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  472. return;
  473. }
  474. modal.classList.add("phpdocumentor-modal__open");
  475. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  476. const exits = modal.querySelectorAll("[data-exit-button]");
  477. exits.forEach(function (exit) {
  478. exit.addEventListener("click", function (event) {
  479. event.preventDefault();
  480. modal.classList.remove("phpdocumentor-modal__open");
  481. });
  482. });
  483. });
  484. });
  485. })();
  486. </script>
  487. </article>
  488. </section>
  489. <section class="phpdocumentor-on-this-page__sidebar">
  490. <section class="phpdocumentor-on-this-page__content">
  491. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  492. <ul class="phpdocumentor-list -clean">
  493. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  494. <li>
  495. <ul class="phpdocumentor-list -clean">
  496. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#toc-constants">Constants</a></li>
  497. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#toc-methods">Methods</a></li>
  498. </ul>
  499. </li>
  500. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  501. <li>
  502. <ul class="phpdocumentor-list -clean">
  503. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromBlob">fromBlob()</a></li>
  504. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_fromFile">fromFile()</a></li>
  505. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getHeight">getHeight()</a></li>
  506. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getLuminances">getLuminances()</a></li>
  507. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getRow">getRow()</a></li>
  508. <li class=""><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#method_getWidth">getWidth()</a></li>
  509. </ul>
  510. </li>
  511. </ul>
  512. </section>
  513. </section>
  514. </div>
  515. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  516. <section class="phpdocumentor-search-results__dialog">
  517. <header class="phpdocumentor-search-results__header">
  518. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  519. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  520. </header>
  521. <section class="phpdocumentor-search-results__body">
  522. <ul class="phpdocumentor-search-results__entries"></ul>
  523. </section>
  524. </section>
  525. </section>
  526. </div>
  527. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  528. </main>
  529. <script>
  530. cssVars({});
  531. </script>
  532. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  533. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  534. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  535. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  536. </body>
  537. </html>