chillerlan-QRCode-Common-LuminanceSourceInterface.html 33 KB

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