chillerlan-QRCode-Common-LuminanceSourceInterface.html 30 KB

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