chillerlan-QRCode-Decoder-LuminanceSourceInterface.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/search.js"></script>
  22. <script defer src="js/searchIndex.js"></script>
  23. </head>
  24. <body id="top">
  25. <header class="phpdocumentor-header phpdocumentor-section">
  26. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  27. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  28. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  29. <i class="fas fa-bars"></i>
  30. </label>
  31. <section data-search-form class="phpdocumentor-search">
  32. <label>
  33. <span class="visually-hidden">Search for</span>
  34. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  35. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  36. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  37. </svg>
  38. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  39. </label>
  40. </section>
  41. <nav class="phpdocumentor-topnav">
  42. <ul class="phpdocumentor-topnav__menu">
  43. <li class="phpdocumentor-topnav__menu-item -menu">
  44. <a href="https://php-qrcode.readthedocs.io">
  45. <span>
  46. User Manual
  47. </span>
  48. </a>
  49. </li>
  50. <li class="phpdocumentor-topnav__menu-item -social">
  51. <a href="https://github.com/chillerlan/php-qrcode">
  52. <span>
  53. <i class="fab fa-github"></i>
  54. </span>
  55. </a>
  56. </li>
  57. </ul>
  58. </nav>
  59. </header>
  60. <main class="phpdocumentor">
  61. <div class="phpdocumentor-section">
  62. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  63. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  64. Menu
  65. </label>
  66. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  67. <section class="phpdocumentor-sidebar__category">
  68. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  69. <h4 class="phpdocumentor-sidebar__root-namespace">
  70. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  71. </h4>
  72. <ul class="phpdocumentor-list">
  73. <li>
  74. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  75. </li>
  76. <li>
  77. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  78. </li>
  79. </ul>
  80. </section>
  81. <section class="phpdocumentor-sidebar__category">
  82. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  83. <h4 class="phpdocumentor-sidebar__root-namespace">
  84. <a href="packages/Application.html" class="">Application</a>
  85. </h4>
  86. </section>
  87. <section class="phpdocumentor-sidebar__category">
  88. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  89. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  92. </section>
  93. <section class="phpdocumentor-sidebar__category">
  94. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  96. </section>
  97. </aside>
  98. <div class="phpdocumentor-column -eight phpdocumentor-content">
  99. <ul class="phpdocumentor-breadcrumbs">
  100. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  101. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  102. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  103. </ul>
  104. <article class="phpdocumentor-element -interface">
  105. <h2 class="phpdocumentor-content__title">
  106. LuminanceSourceInterface
  107. <div class="phpdocumentor-element__package">
  108. in
  109. <ul class="phpdocumentor-breadcrumbs">
  110. <li><a href="packages/Application.html">Application</a></li>
  111. </ul>
  112. </div>
  113. </h2>
  114. <aside class="phpdocumentor-element-found-in">
  115. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  116. :
  117. <span class="phpdocumentor-element-found-in__line">15</span>
  118. </aside>
  119. <h3 id="toc">
  120. Table of Contents
  121. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  122. </h3>
  123. <dl class="phpdocumentor-table-of-contents">
  124. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  125. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_fromBlob">fromBlob()</a>
  126. <span>
  127. &nbsp;: self </span>
  128. </dt>
  129. <dd>Creates a LuminanceSource instance from the given data blob</dd>
  130. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  131. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_fromFile">fromFile()</a>
  132. <span>
  133. &nbsp;: self </span>
  134. </dt>
  135. <dd>Creates a LuminanceSource instance from the given file</dd>
  136. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  137. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getHeight">getHeight()</a>
  138. <span>
  139. &nbsp;: int </span>
  140. </dt>
  141. <dd></dd>
  142. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  143. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getLuminances">getLuminances()</a>
  144. <span>
  145. &nbsp;: array&lt;string|int, mixed&gt; </span>
  146. </dt>
  147. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  148. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  149. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  150. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getRow">getRow()</a>
  151. <span>
  152. &nbsp;: array&lt;string|int, mixed&gt; </span>
  153. </dt>
  154. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  155. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  156. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  157. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  158. getLuminances() may never be called.</dd>
  159. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  160. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getWidth">getWidth()</a>
  161. <span>
  162. &nbsp;: int </span>
  163. </dt>
  164. <dd></dd>
  165. </dl>
  166. <section class="phpdocumentor-methods">
  167. <h3 class="phpdocumentor-elements__header" id="methods">
  168. Methods
  169. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  170. </h3>
  171. <article
  172. class="phpdocumentor-element
  173. -method
  174. -public
  175. -static "
  176. >
  177. <h4 class="phpdocumentor-element__name" id="method_fromBlob">
  178. fromBlob()
  179. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_fromBlob" class="headerlink"><i class="fas fa-link"></i></a>
  180. </h4>
  181. <aside class="phpdocumentor-element-found-in">
  182. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  183. :
  184. <span class="phpdocumentor-element-found-in__line">59</span>
  185. </aside>
  186. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given data blob</p>
  187. <code class="phpdocumentor-code phpdocumentor-signature ">
  188. <span class="phpdocumentor-signature__visibility">public</span>
  189. <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>
  190. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  191. <dl class="phpdocumentor-argument-list">
  192. <dt class="phpdocumentor-argument-list__entry">
  193. <span class="phpdocumentor-signature__argument__name">$blob</span>
  194. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  195. </dt>
  196. <dd class="phpdocumentor-argument-list__definition">
  197. <section class="phpdocumentor-description"></section>
  198. </dd>
  199. </dl>
  200. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  201. <span class="phpdocumentor-signature__response_type">self</span>
  202. &mdash;
  203. </article>
  204. <article
  205. class="phpdocumentor-element
  206. -method
  207. -public
  208. -static "
  209. >
  210. <h4 class="phpdocumentor-element__name" id="method_fromFile">
  211. fromFile()
  212. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_fromFile" class="headerlink"><i class="fas fa-link"></i></a>
  213. </h4>
  214. <aside class="phpdocumentor-element-found-in">
  215. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  216. :
  217. <span class="phpdocumentor-element-found-in__line">54</span>
  218. </aside>
  219. <p class="phpdocumentor-summary">Creates a LuminanceSource instance from the given file</p>
  220. <code class="phpdocumentor-code phpdocumentor-signature ">
  221. <span class="phpdocumentor-signature__visibility">public</span>
  222. <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>
  223. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  224. <dl class="phpdocumentor-argument-list">
  225. <dt class="phpdocumentor-argument-list__entry">
  226. <span class="phpdocumentor-signature__argument__name">$path</span>
  227. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  228. </dt>
  229. <dd class="phpdocumentor-argument-list__definition">
  230. <section class="phpdocumentor-description"></section>
  231. </dd>
  232. </dl>
  233. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  234. <span class="phpdocumentor-signature__response_type">self</span>
  235. &mdash;
  236. </article>
  237. <article
  238. class="phpdocumentor-element
  239. -method
  240. -public
  241. "
  242. >
  243. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  244. getHeight()
  245. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  246. </h4>
  247. <aside class="phpdocumentor-element-found-in">
  248. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  249. :
  250. <span class="phpdocumentor-element-found-in__line">35</span>
  251. </aside>
  252. <code class="phpdocumentor-code phpdocumentor-signature ">
  253. <span class="phpdocumentor-signature__visibility">public</span>
  254. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  255. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  256. <span class="phpdocumentor-signature__response_type">int</span>
  257. &mdash;
  258. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  259. </section>
  260. </article>
  261. <article
  262. class="phpdocumentor-element
  263. -method
  264. -public
  265. "
  266. >
  267. <h4 class="phpdocumentor-element__name" id="method_getLuminances">
  268. getLuminances()
  269. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getLuminances" class="headerlink"><i class="fas fa-link"></i></a>
  270. </h4>
  271. <aside class="phpdocumentor-element-found-in">
  272. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  273. :
  274. <span class="phpdocumentor-element-found-in__line">25</span>
  275. </aside>
  276. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  277. `int luminance = array[y * width + x] &amp; 0xff`</p>
  278. <code class="phpdocumentor-code phpdocumentor-signature ">
  279. <span class="phpdocumentor-signature__visibility">public</span>
  280. <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>
  281. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  282. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  283. &mdash;
  284. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result $length as it may be
  285. larger than $width * $height bytes on some platforms. Do not modify the contents
  286. of the result.</p>
  287. </section>
  288. </article>
  289. <article
  290. class="phpdocumentor-element
  291. -method
  292. -public
  293. "
  294. >
  295. <h4 class="phpdocumentor-element__name" id="method_getRow">
  296. getRow()
  297. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  298. </h4>
  299. <aside class="phpdocumentor-element-found-in">
  300. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  301. :
  302. <span class="phpdocumentor-element-found-in__line">49</span>
  303. </aside>
  304. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  305. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  306. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  307. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  308. getLuminances() may never be called.</p>
  309. <code class="phpdocumentor-code phpdocumentor-signature ">
  310. <span class="phpdocumentor-signature__visibility">public</span>
  311. <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>
  312. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  313. <dl class="phpdocumentor-argument-list">
  314. <dt class="phpdocumentor-argument-list__entry">
  315. <span class="phpdocumentor-signature__argument__name">$y</span>
  316. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  317. </dt>
  318. <dd class="phpdocumentor-argument-list__definition">
  319. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  320. </section>
  321. </dd>
  322. </dl>
  323. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  324. Tags
  325. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  326. </h5>
  327. <dl class="phpdocumentor-tag-list">
  328. <dt class="phpdocumentor-tag-list__entry">
  329. <span class="phpdocumentor-tag__name">throws</span>
  330. </dt>
  331. <dd class="phpdocumentor-tag-list__definition">
  332. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  333. </dd>
  334. </dl>
  335. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  336. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  337. &mdash;
  338. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  339. </section>
  340. </article>
  341. <article
  342. class="phpdocumentor-element
  343. -method
  344. -public
  345. "
  346. >
  347. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  348. getWidth()
  349. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  350. </h4>
  351. <aside class="phpdocumentor-element-found-in">
  352. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/LuminanceSourceInterface.php"><a href="files/src-decoder-luminancesourceinterface.html"><abbr title="src/Decoder/LuminanceSourceInterface.php">LuminanceSourceInterface.php</abbr></a></abbr>
  353. :
  354. <span class="phpdocumentor-element-found-in__line">30</span>
  355. </aside>
  356. <code class="phpdocumentor-code phpdocumentor-signature ">
  357. <span class="phpdocumentor-signature__visibility">public</span>
  358. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  359. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  360. <span class="phpdocumentor-signature__response_type">int</span>
  361. &mdash;
  362. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  363. </section>
  364. </article>
  365. </section>
  366. <script type="text/javascript">
  367. function loadExternalCodeSnippets(line) {
  368. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  369. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  370. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  371. var language = 'php';
  372. var code = document.createElement('code');
  373. code.className = 'language-' + language;
  374. pre.textContent = '';
  375. pre.setAttribute('data-line', line)
  376. code.textContent = 'Loading…';
  377. pre.appendChild(code);
  378. var xhr = new XMLHttpRequest();
  379. xhr.open('GET', src, true);
  380. xhr.onreadystatechange = function () {
  381. if (xhr.readyState == 4) {
  382. if (xhr.status < 400 && xhr.responseText) {
  383. code.textContent = xhr.responseText;
  384. Prism.highlightElement(code);
  385. }
  386. else if (xhr.status >= 400) {
  387. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  388. }
  389. else {
  390. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  391. }
  392. }
  393. };
  394. xhr.send(null);
  395. });
  396. }
  397. var modals = document.querySelectorAll("[data-modal]");
  398. modals.forEach(function (trigger) {
  399. trigger.addEventListener("click", function (event) {
  400. //event.preventDefault();
  401. const modal = document.getElementById(trigger.dataset.modal);
  402. modal.classList.add("phpdocumentor-modal__open");
  403. loadExternalCodeSnippets(trigger.dataset.line)
  404. const exits = modal.querySelectorAll("[data-exit-button]");
  405. exits.forEach(function (exit) {
  406. exit.addEventListener("click", function (event) {
  407. event.preventDefault();
  408. modal.classList.remove("phpdocumentor-modal__open");
  409. });
  410. });
  411. });
  412. });
  413. </script>
  414. </article>
  415. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  416. <section class="phpdocumentor-search-results__dialog">
  417. <header class="phpdocumentor-search-results__header">
  418. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  419. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  420. </header>
  421. <section class="phpdocumentor-search-results__body">
  422. <ul class="phpdocumentor-search-results__entries"></ul>
  423. </section>
  424. </section>
  425. </section>
  426. </div>
  427. </div>
  428. <a href="classes/chillerlan-QRCode-Decoder-LuminanceSourceInterface.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  429. </main>
  430. <script>
  431. cssVars({});
  432. </script>
  433. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  434. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  435. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  436. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  437. </body>
  438. </html>