chillerlan-QRCode-Common-LuminanceSourceInterface.html 33 KB

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