chillerlan-QRCode-Common-LuminanceSourceAbstract.html 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000
  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 -class">
  107. <h2 class="phpdocumentor-content__title">
  108. LuminanceSourceAbstract
  109. <div class="phpdocumentor-element__package">
  110. in package
  111. <ul class="phpdocumentor-breadcrumbs">
  112. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  113. </ul>
  114. </div>
  115. <span class="phpdocumentor-element__implements">
  116. implements
  117. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a> </span>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Abstract</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">26</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">The purpose of this class hierarchy is to abstract different bitmap implementations across
  128. platforms into a standard interface for requesting greyscale luminance values.</p>
  129. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  130. Tags
  131. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  132. </h5>
  133. <dl class="phpdocumentor-tag-list">
  134. <dt class="phpdocumentor-tag-list__entry">
  135. <span class="phpdocumentor-tag__name">author</span>
  136. </dt>
  137. <dd class="phpdocumentor-tag-list__definition">
  138. <section class="phpdocumentor-description"><p>dswitkin@google.com (Daniel Switkin)</p>
  139. </section>
  140. </dd>
  141. </dl>
  142. <h3 id="toc">
  143. Table of Contents
  144. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  145. </h3>
  146. <h4 id="toc-interfaces">
  147. Interfaces
  148. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc-interfaces" class="headerlink"><i class="fas fa-link"></i></a>
  149. </h4>
  150. <dl class="phpdocumentor-table-of-contents">
  151. <dt class="phpdocumentor-table-of-contents__entry -interface"><a href="classes/chillerlan-QRCode-Common-LuminanceSourceInterface.html"><abbr title="\chillerlan\QRCode\Common\LuminanceSourceInterface">LuminanceSourceInterface</abbr></a></dt> </dl>
  152. <h4 id="toc-properties">
  153. Properties
  154. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  155. </h4>
  156. <dl class="phpdocumentor-table-of-contents">
  157. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  158. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height">$height</a>
  159. <span>
  160. &nbsp;: int </span>
  161. </dt>
  162. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  163. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances">$luminances</a>
  164. <span>
  165. &nbsp;: array&lt;string|int, mixed&gt; </span>
  166. </dt>
  167. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  168. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options">$options</a>
  169. <span>
  170. &nbsp;: <a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>|<abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr> </span>
  171. </dt>
  172. <dt class="phpdocumentor-table-of-contents__entry -property -protected">
  173. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width">$width</a>
  174. <span>
  175. &nbsp;: int </span>
  176. </dt>
  177. </dl>
  178. <h4 id="toc-methods">
  179. Methods
  180. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  181. </h4>
  182. <dl class="phpdocumentor-table-of-contents">
  183. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  184. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method___construct">__construct()</a>
  185. <span>
  186. &nbsp;: mixed </span>
  187. </dt>
  188. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  189. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a>
  190. <span>
  191. &nbsp;: int </span>
  192. </dt>
  193. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  194. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances">getLuminances()</a>
  195. <span>
  196. &nbsp;: array&lt;string|int, mixed&gt; </span>
  197. </dt>
  198. <dd>Fetches luminance data for the underlying bitmap. Values should be fetched using:
  199. `int luminance = array[y * width + x] &amp; 0xff`</dd>
  200. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  201. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow">getRow()</a>
  202. <span>
  203. &nbsp;: array&lt;string|int, mixed&gt; </span>
  204. </dt>
  205. <dd>Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  206. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  207. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  208. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  209. getLuminances() may never be called.</dd>
  210. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  211. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a>
  212. <span>
  213. &nbsp;: int </span>
  214. </dt>
  215. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  216. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a>
  217. <span>
  218. &nbsp;: string </span>
  219. </dt>
  220. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  221. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a>
  222. <span>
  223. &nbsp;: void </span>
  224. </dt>
  225. </dl>
  226. <section class="phpdocumentor-properties">
  227. <h3 class="phpdocumentor-elements__header" id="properties">
  228. Properties
  229. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  230. </h3>
  231. <article
  232. class="
  233. phpdocumentor-element
  234. -property
  235. -protected
  236. "
  237. >
  238. <h4 class="phpdocumentor-element__name" id="property_height">
  239. $height
  240. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height" class="headerlink"><i class="fas fa-link"></i></a>
  241. <span class="phpdocumentor-element__modifiers">
  242. </span>
  243. </h4>
  244. <aside class="phpdocumentor-element-found-in">
  245. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  246. :
  247. <span class="phpdocumentor-element-found-in__line">32</span>
  248. </aside>
  249. <code class="phpdocumentor-code phpdocumentor-signature ">
  250. <span class="phpdocumentor-signature__visibility">protected</span>
  251. <span class="phpdocumentor-signature__type">int</span>
  252. <span class="phpdocumentor-signature__name">$height</span>
  253. </code>
  254. </article>
  255. <article
  256. class="
  257. phpdocumentor-element
  258. -property
  259. -protected
  260. "
  261. >
  262. <h4 class="phpdocumentor-element__name" id="property_luminances">
  263. $luminances
  264. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances" class="headerlink"><i class="fas fa-link"></i></a>
  265. <span class="phpdocumentor-element__modifiers">
  266. </span>
  267. </h4>
  268. <aside class="phpdocumentor-element-found-in">
  269. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  270. :
  271. <span class="phpdocumentor-element-found-in__line">30</span>
  272. </aside>
  273. <code class="phpdocumentor-code phpdocumentor-signature ">
  274. <span class="phpdocumentor-signature__visibility">protected</span>
  275. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  276. <span class="phpdocumentor-signature__name">$luminances</span>
  277. </code>
  278. </article>
  279. <article
  280. class="
  281. phpdocumentor-element
  282. -property
  283. -protected
  284. "
  285. >
  286. <h4 class="phpdocumentor-element__name" id="property_options">
  287. $options
  288. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  289. <span class="phpdocumentor-element__modifiers">
  290. </span>
  291. </h4>
  292. <aside class="phpdocumentor-element-found-in">
  293. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  294. :
  295. <span class="phpdocumentor-element-found-in__line">29</span>
  296. </aside>
  297. <code class="phpdocumentor-code phpdocumentor-signature ">
  298. <span class="phpdocumentor-signature__visibility">protected</span>
  299. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a>|<abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  300. <span class="phpdocumentor-signature__name">$options</span>
  301. </code>
  302. </article>
  303. <article
  304. class="
  305. phpdocumentor-element
  306. -property
  307. -protected
  308. "
  309. >
  310. <h4 class="phpdocumentor-element__name" id="property_width">
  311. $width
  312. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width" class="headerlink"><i class="fas fa-link"></i></a>
  313. <span class="phpdocumentor-element__modifiers">
  314. </span>
  315. </h4>
  316. <aside class="phpdocumentor-element-found-in">
  317. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  318. :
  319. <span class="phpdocumentor-element-found-in__line">31</span>
  320. </aside>
  321. <code class="phpdocumentor-code phpdocumentor-signature ">
  322. <span class="phpdocumentor-signature__visibility">protected</span>
  323. <span class="phpdocumentor-signature__type">int</span>
  324. <span class="phpdocumentor-signature__name">$width</span>
  325. </code>
  326. </article>
  327. </section>
  328. <section class="phpdocumentor-methods">
  329. <h3 class="phpdocumentor-elements__header" id="methods">
  330. Methods
  331. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  332. </h3>
  333. <article
  334. class="phpdocumentor-element
  335. -method
  336. -public
  337. "
  338. >
  339. <h4 class="phpdocumentor-element__name" id="method___construct">
  340. __construct()
  341. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  342. </h4>
  343. <aside class="phpdocumentor-element-found-in">
  344. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  345. :
  346. <span class="phpdocumentor-element-found-in__line">37</span>
  347. </aside>
  348. <code class="phpdocumentor-code phpdocumentor-signature ">
  349. <span class="phpdocumentor-signature__visibility">public</span>
  350. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$width</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$height</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>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$options</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  351. <div class="phpdocumentor-label-line">
  352. </div>
  353. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  354. <dl class="phpdocumentor-argument-list">
  355. <dt class="phpdocumentor-argument-list__entry">
  356. <span class="phpdocumentor-signature__argument__name">$width</span>
  357. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  358. </dt>
  359. <dd class="phpdocumentor-argument-list__definition">
  360. </dd>
  361. <dt class="phpdocumentor-argument-list__entry">
  362. <span class="phpdocumentor-signature__argument__name">$height</span>
  363. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  364. </dt>
  365. <dd class="phpdocumentor-argument-list__definition">
  366. </dd>
  367. <dt class="phpdocumentor-argument-list__entry">
  368. <span class="phpdocumentor-signature__argument__name">$options</span>
  369. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\chillerlan\Settings\SettingsContainerInterface">SettingsContainerInterface</abbr></span>
  370. = <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
  371. <dd class="phpdocumentor-argument-list__definition">
  372. </dd>
  373. </dl>
  374. </article>
  375. <article
  376. class="phpdocumentor-element
  377. -method
  378. -public
  379. "
  380. >
  381. <h4 class="phpdocumentor-element__name" id="method_getHeight">
  382. getHeight()
  383. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight" class="headerlink"><i class="fas fa-link"></i></a>
  384. </h4>
  385. <aside class="phpdocumentor-element-found-in">
  386. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  387. :
  388. <span class="phpdocumentor-element-found-in__line">56</span>
  389. </aside>
  390. <code class="phpdocumentor-code phpdocumentor-signature ">
  391. <span class="phpdocumentor-signature__visibility">public</span>
  392. <span class="phpdocumentor-signature__name">getHeight</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  393. <div class="phpdocumentor-label-line">
  394. </div>
  395. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  396. Tags
  397. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight#tags" class="headerlink"><i class="fas fa-link"></i></a>
  398. </h5>
  399. <dl class="phpdocumentor-tag-list">
  400. <dt class="phpdocumentor-tag-list__entry">
  401. <span class="phpdocumentor-tag__name">inheritDoc</span>
  402. </dt>
  403. <dd class="phpdocumentor-tag-list__definition">
  404. </dd>
  405. </dl>
  406. <section>
  407. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  408. <span class="phpdocumentor-signature__response_type">int</span>
  409. &mdash;
  410. <section class="phpdocumentor-description"><p>The height of the bitmap.</p>
  411. </section>
  412. </section>
  413. </article>
  414. <article
  415. class="phpdocumentor-element
  416. -method
  417. -public
  418. "
  419. >
  420. <h4 class="phpdocumentor-element__name" id="method_getLuminances">
  421. getLuminances()
  422. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances" class="headerlink"><i class="fas fa-link"></i></a>
  423. </h4>
  424. <aside class="phpdocumentor-element-found-in">
  425. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  426. :
  427. <span class="phpdocumentor-element-found-in__line">46</span>
  428. </aside>
  429. <p class="phpdocumentor-summary">Fetches luminance data for the underlying bitmap. Values should be fetched using:
  430. `int luminance = array[y * width + x] &amp; 0xff`</p>
  431. <code class="phpdocumentor-code phpdocumentor-signature ">
  432. <span class="phpdocumentor-signature__visibility">public</span>
  433. <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>
  434. <div class="phpdocumentor-label-line">
  435. </div>
  436. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  437. Tags
  438. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances#tags" class="headerlink"><i class="fas fa-link"></i></a>
  439. </h5>
  440. <dl class="phpdocumentor-tag-list">
  441. <dt class="phpdocumentor-tag-list__entry">
  442. <span class="phpdocumentor-tag__name">inheritDoc</span>
  443. </dt>
  444. <dd class="phpdocumentor-tag-list__definition">
  445. </dd>
  446. </dl>
  447. <section>
  448. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  449. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  450. &mdash;
  451. <section class="phpdocumentor-description"><p>A row-major 2D array of luminance values. Do not use result $length as it may be
  452. larger than $width * $height bytes on some platforms. Do not modify the contents
  453. of the result.</p>
  454. </section>
  455. </section>
  456. </article>
  457. <article
  458. class="phpdocumentor-element
  459. -method
  460. -public
  461. "
  462. >
  463. <h4 class="phpdocumentor-element__name" id="method_getRow">
  464. getRow()
  465. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow" class="headerlink"><i class="fas fa-link"></i></a>
  466. </h4>
  467. <aside class="phpdocumentor-element-found-in">
  468. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  469. :
  470. <span class="phpdocumentor-element-found-in__line">61</span>
  471. </aside>
  472. <p class="phpdocumentor-summary">Fetches one row of luminance data from the underlying platform&#039;s bitmap. Values range from
  473. 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have
  474. to bitwise and with 0xff for each value. It is preferable for implementations of this method
  475. to only fetch this row rather than the whole image, since no 2D Readers may be installed and
  476. getLuminances() may never be called.</p>
  477. <code class="phpdocumentor-code phpdocumentor-signature ">
  478. <span class="phpdocumentor-signature__visibility">public</span>
  479. <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>
  480. <div class="phpdocumentor-label-line">
  481. </div>
  482. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  483. <dl class="phpdocumentor-argument-list">
  484. <dt class="phpdocumentor-argument-list__entry">
  485. <span class="phpdocumentor-signature__argument__name">$y</span>
  486. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  487. </dt>
  488. <dd class="phpdocumentor-argument-list__definition">
  489. <section class="phpdocumentor-description"><p>The row to fetch, which must be in [0,getHeight())</p>
  490. </section>
  491. </dd>
  492. </dl>
  493. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  494. Tags
  495. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow#tags" class="headerlink"><i class="fas fa-link"></i></a>
  496. </h5>
  497. <dl class="phpdocumentor-tag-list">
  498. <dt class="phpdocumentor-tag-list__entry">
  499. <span class="phpdocumentor-tag__name">inheritDoc</span>
  500. </dt>
  501. <dd class="phpdocumentor-tag-list__definition">
  502. </dd>
  503. </dl>
  504. <section>
  505. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  506. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  507. &mdash;
  508. <section class="phpdocumentor-description"><p>An array containing the luminance data.</p>
  509. </section>
  510. </section>
  511. </article>
  512. <article
  513. class="phpdocumentor-element
  514. -method
  515. -public
  516. "
  517. >
  518. <h4 class="phpdocumentor-element__name" id="method_getWidth">
  519. getWidth()
  520. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth" class="headerlink"><i class="fas fa-link"></i></a>
  521. </h4>
  522. <aside class="phpdocumentor-element-found-in">
  523. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  524. :
  525. <span class="phpdocumentor-element-found-in__line">51</span>
  526. </aside>
  527. <code class="phpdocumentor-code phpdocumentor-signature ">
  528. <span class="phpdocumentor-signature__visibility">public</span>
  529. <span class="phpdocumentor-signature__name">getWidth</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  530. <div class="phpdocumentor-label-line">
  531. </div>
  532. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  533. Tags
  534. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth#tags" class="headerlink"><i class="fas fa-link"></i></a>
  535. </h5>
  536. <dl class="phpdocumentor-tag-list">
  537. <dt class="phpdocumentor-tag-list__entry">
  538. <span class="phpdocumentor-tag__name">inheritDoc</span>
  539. </dt>
  540. <dd class="phpdocumentor-tag-list__definition">
  541. </dd>
  542. </dl>
  543. <section>
  544. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  545. <span class="phpdocumentor-signature__response_type">int</span>
  546. &mdash;
  547. <section class="phpdocumentor-description"><p>The width of the bitmap.</p>
  548. </section>
  549. </section>
  550. </article>
  551. <article
  552. class="phpdocumentor-element
  553. -method
  554. -protected
  555. -static "
  556. >
  557. <h4 class="phpdocumentor-element__name" id="method_checkFile">
  558. checkFile()
  559. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile" class="headerlink"><i class="fas fa-link"></i></a>
  560. </h4>
  561. <aside class="phpdocumentor-element-found-in">
  562. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  563. :
  564. <span class="phpdocumentor-element-found-in__line">88</span>
  565. </aside>
  566. <code class="phpdocumentor-code phpdocumentor-signature ">
  567. <span class="phpdocumentor-signature__visibility">protected</span>
  568. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">checkFile</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">string</span></code>
  569. <div class="phpdocumentor-label-line">
  570. </div>
  571. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  572. <dl class="phpdocumentor-argument-list">
  573. <dt class="phpdocumentor-argument-list__entry">
  574. <span class="phpdocumentor-signature__argument__name">$path</span>
  575. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  576. </dt>
  577. <dd class="phpdocumentor-argument-list__definition">
  578. </dd>
  579. </dl>
  580. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  581. Tags
  582. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile#tags" class="headerlink"><i class="fas fa-link"></i></a>
  583. </h5>
  584. <dl class="phpdocumentor-tag-list">
  585. <dt class="phpdocumentor-tag-list__entry">
  586. <span class="phpdocumentor-tag__name">throws</span>
  587. </dt>
  588. <dd class="phpdocumentor-tag-list__definition">
  589. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  590. </dd>
  591. </dl>
  592. <section>
  593. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  594. <span class="phpdocumentor-signature__response_type">string</span>
  595. </section>
  596. </article>
  597. <article
  598. class="phpdocumentor-element
  599. -method
  600. -protected
  601. "
  602. >
  603. <h4 class="phpdocumentor-element__name" id="method_setLuminancePixel">
  604. setLuminancePixel()
  605. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel" class="headerlink"><i class="fas fa-link"></i></a>
  606. </h4>
  607. <aside class="phpdocumentor-element-found-in">
  608. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/LuminanceSourceAbstract.php"><a href="files/src-common-luminancesourceabstract.html"><abbr title="src/Common/LuminanceSourceAbstract.php">LuminanceSourceAbstract.php</abbr></a></abbr>
  609. :
  610. <span class="phpdocumentor-element-found-in__line">77</span>
  611. </aside>
  612. <code class="phpdocumentor-code phpdocumentor-signature ">
  613. <span class="phpdocumentor-signature__visibility">protected</span>
  614. <span class="phpdocumentor-signature__name">setLuminancePixel</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$r</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$g</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  615. <div class="phpdocumentor-label-line">
  616. </div>
  617. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  618. <dl class="phpdocumentor-argument-list">
  619. <dt class="phpdocumentor-argument-list__entry">
  620. <span class="phpdocumentor-signature__argument__name">$r</span>
  621. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  622. </dt>
  623. <dd class="phpdocumentor-argument-list__definition">
  624. </dd>
  625. <dt class="phpdocumentor-argument-list__entry">
  626. <span class="phpdocumentor-signature__argument__name">$g</span>
  627. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  628. </dt>
  629. <dd class="phpdocumentor-argument-list__definition">
  630. </dd>
  631. <dt class="phpdocumentor-argument-list__entry">
  632. <span class="phpdocumentor-signature__argument__name">$b</span>
  633. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  634. </dt>
  635. <dd class="phpdocumentor-argument-list__definition">
  636. </dd>
  637. </dl>
  638. </article>
  639. </section>
  640. <div class="phpdocumentor-modal" id="source-view">
  641. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  642. <div class="phpdocumentor-modal-container">
  643. <div class="phpdocumentor-modal-content">
  644. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Common/LuminanceSourceAbstract.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  645. </div>
  646. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  647. </div>
  648. </div>
  649. <script type="text/javascript">
  650. (function () {
  651. function loadExternalCodeSnippet(el, url, line) {
  652. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  653. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  654. const language = 'php';
  655. const code = document.createElement('code');
  656. code.className = 'language-' + language;
  657. pre.textContent = '';
  658. pre.setAttribute('data-line', line)
  659. code.textContent = 'Loading…';
  660. pre.appendChild(code);
  661. var xhr = new XMLHttpRequest();
  662. xhr.open('GET', src, true);
  663. xhr.onreadystatechange = function () {
  664. if (xhr.readyState !== 4) {
  665. return;
  666. }
  667. if (xhr.status < 400 && xhr.responseText) {
  668. code.textContent = xhr.responseText;
  669. Prism.highlightElement(code);
  670. return;
  671. }
  672. if (xhr.status === 404) {
  673. code.textContent = '✖ Error: File could not be found';
  674. return;
  675. }
  676. if (xhr.status >= 400) {
  677. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  678. return;
  679. }
  680. code.textContent = '✖ Error: An unknown error occurred';
  681. };
  682. xhr.send(null);
  683. });
  684. }
  685. const modalButtons = document.querySelectorAll("[data-modal]");
  686. const openedAsLocalFile = window.location.protocol === 'file:';
  687. if (modalButtons.length > 0 && openedAsLocalFile) {
  688. console.warn(
  689. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  690. 'browsers block XHR requests when a page is opened this way'
  691. );
  692. }
  693. modalButtons.forEach(function (trigger) {
  694. if (openedAsLocalFile) {
  695. trigger.setAttribute("hidden", "hidden");
  696. }
  697. trigger.addEventListener("click", function (event) {
  698. event.preventDefault();
  699. const modal = document.getElementById(trigger.dataset.modal);
  700. if (!modal) {
  701. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  702. return;
  703. }
  704. modal.classList.add("phpdocumentor-modal__open");
  705. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  706. const exits = modal.querySelectorAll("[data-exit-button]");
  707. exits.forEach(function (exit) {
  708. exit.addEventListener("click", function (event) {
  709. event.preventDefault();
  710. modal.classList.remove("phpdocumentor-modal__open");
  711. });
  712. });
  713. });
  714. });
  715. })();
  716. </script>
  717. </article>
  718. </section>
  719. <section class="phpdocumentor-on-this-page__sidebar">
  720. <section class="phpdocumentor-on-this-page__content">
  721. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  722. <ul class="phpdocumentor-list -clean">
  723. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  724. <li>
  725. <ul class="phpdocumentor-list -clean">
  726. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc-properties">Properties</a></li>
  727. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#toc-methods">Methods</a></li>
  728. </ul>
  729. </li>
  730. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  731. <li>
  732. <ul class="phpdocumentor-list -clean">
  733. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_height">$height<a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html"></li>
  734. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_luminances">$luminances<a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html"></li>
  735. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_options">$options<a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html"></li>
  736. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#property_width">$width<a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html"></li>
  737. </ul>
  738. </li>
  739. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  740. <li>
  741. <ul class="phpdocumentor-list -clean">
  742. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method___construct">__construct()</a></li>
  743. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getHeight">getHeight()</a></li>
  744. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getLuminances">getLuminances()</a></li>
  745. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getRow">getRow()</a></li>
  746. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_getWidth">getWidth()</a></li>
  747. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_checkFile">checkFile()</a></li>
  748. <li><a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#method_setLuminancePixel">setLuminancePixel()</a></li>
  749. </ul>
  750. </li>
  751. </ul>
  752. </section>
  753. </section>
  754. </div>
  755. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  756. <section class="phpdocumentor-search-results__dialog">
  757. <header class="phpdocumentor-search-results__header">
  758. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  759. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  760. </header>
  761. <section class="phpdocumentor-search-results__body">
  762. <ul class="phpdocumentor-search-results__entries"></ul>
  763. </section>
  764. </section>
  765. </section>
  766. </div>
  767. <a href="classes/chillerlan-QRCode-Common-LuminanceSourceAbstract.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  768. </main>
  769. <script>
  770. cssVars({});
  771. </script>
  772. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  773. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  774. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  775. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  776. </body>
  777. </html>