chillerlan-QRCode-Decoder-BitMatrix.html 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  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. </ul>
  44. </nav>
  45. </header>
  46. <main class="phpdocumentor">
  47. <div class="phpdocumentor-section">
  48. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  49. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  50. Menu
  51. </label>
  52. <aside class="phpdocumentor-column -four phpdocumentor-sidebar">
  53. <section class="phpdocumentor-sidebar__category">
  54. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  55. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/chillerlan.html">chillerlan</a></h4>
  56. <ul class="phpdocumentor-list">
  57. <li>
  58. <a href="namespaces/chillerlan-qrcode.html">QRCode</a>
  59. </li>
  60. <li>
  61. <a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a>
  62. </li>
  63. </ul>
  64. </section>
  65. <section class="phpdocumentor-sidebar__category">
  66. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  67. <h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
  68. </section>
  69. <section class="phpdocumentor-sidebar__category">
  70. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  71. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  72. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  73. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  74. </section>
  75. <section class="phpdocumentor-sidebar__category">
  76. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  77. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  78. </section>
  79. </aside>
  80. <div class="phpdocumentor-column -eight phpdocumentor-content">
  81. <ul class="phpdocumentor-breadcrumbs">
  82. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  83. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  84. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  85. </ul>
  86. <article class="phpdocumentor-element -class">
  87. <h2 class="phpdocumentor-content__title">
  88. BitMatrix
  89. <div class="phpdocumentor-element__package">
  90. in package
  91. <ul class="phpdocumentor-breadcrumbs">
  92. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  93. </ul>
  94. </div>
  95. </h2>
  96. <aside class="phpdocumentor-element-found-in">
  97. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  98. :
  99. <span class="phpdocumentor-element-found-in__line">21</span>
  100. </aside>
  101. <h3 id="toc">
  102. Table of Contents
  103. <a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
  104. </h3>
  105. <dl class="phpdocumentor-table-of-contents">
  106. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  107. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_bits">$bits</a>
  108. <span>
  109. &nbsp;: array&lt;string|int, mixed&gt; </span>
  110. </dt>
  111. <dd></dd>
  112. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  113. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_dimension">$dimension</a>
  114. <span>
  115. &nbsp;: int </span>
  116. </dt>
  117. <dd></dd>
  118. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  119. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_rowSize">$rowSize</a>
  120. <span>
  121. &nbsp;: int </span>
  122. </dt>
  123. <dd></dd>
  124. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  125. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method___construct">__construct()</a>
  126. <span>
  127. &nbsp;: mixed </span>
  128. </dt>
  129. <dd></dd>
  130. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  131. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_buildFunctionPattern">buildFunctionPattern()</a>
  132. <span>
  133. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  134. </dt>
  135. <dd>See ISO 18004:2006 Annex E</dd>
  136. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  137. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_flip">flip()</a>
  138. <span>
  139. &nbsp;: void </span>
  140. </dt>
  141. <dd>&lt;p&gt;Flips the given bit. 1 &lt;&lt; (0xf9 &amp; 0x1f)&lt;/p&gt;</dd>
  142. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  143. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_get">get()</a>
  144. <span>
  145. &nbsp;: bool </span>
  146. </dt>
  147. <dd>&lt;p&gt;Gets the requested bit, where true means black.&lt;/p&gt;</dd>
  148. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  149. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_getDimension">getDimension()</a>
  150. <span>
  151. &nbsp;: int </span>
  152. </dt>
  153. <dd></dd>
  154. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  155. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_mirror">mirror()</a>
  156. <span>
  157. &nbsp;: void </span>
  158. </dt>
  159. <dd>Mirror the bit matrix in order to attempt a second reading.</dd>
  160. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  161. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_set">set()</a>
  162. <span>
  163. &nbsp;: void </span>
  164. </dt>
  165. <dd>&lt;p&gt;Sets the given bit to true.&lt;/p&gt;</dd>
  166. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  167. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_setRegion">setRegion()</a>
  168. <span>
  169. &nbsp;: void </span>
  170. </dt>
  171. <dd>&lt;p&gt;Sets a square region of the bit matrix to true.&lt;/p&gt;</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_unmask">unmask()</a>
  174. <span>
  175. &nbsp;: void </span>
  176. </dt>
  177. <dd>Implementations of this method reverse the data masking process applied to a QR Code and
  178. make its bits ready to read.</dd>
  179. </dl>
  180. <section class="phpdocumentor-properties">
  181. <h3 class="phpdocumentor-elements__header" id="properties">
  182. Properties
  183. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  184. </h3>
  185. <article
  186. class="
  187. phpdocumentor-element
  188. -property
  189. -private
  190. "
  191. >
  192. <h4 class="phpdocumentor-element__name" id="property_bits">
  193. $bits
  194. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_bits" class="headerlink"><i class="fas fa-link"></i></a>
  195. <span class="phpdocumentor-element__modifiers">
  196. </span>
  197. </h4>
  198. <aside class="phpdocumentor-element-found-in">
  199. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  200. :
  201. <span class="phpdocumentor-element-found-in__line">25</span>
  202. </aside>
  203. <code class="phpdocumentor-code phpdocumentor-signature ">
  204. <span class="phpdocumentor-signature__visibility">private</span>
  205. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  206. <span class="phpdocumentor-signature__name">$bits</span>
  207. </code>
  208. <section class="phpdocumentor-description"></section>
  209. <section class="phpdocumentor-description"></section>
  210. </article>
  211. <article
  212. class="
  213. phpdocumentor-element
  214. -property
  215. -private
  216. "
  217. >
  218. <h4 class="phpdocumentor-element__name" id="property_dimension">
  219. $dimension
  220. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_dimension" class="headerlink"><i class="fas fa-link"></i></a>
  221. <span class="phpdocumentor-element__modifiers">
  222. </span>
  223. </h4>
  224. <aside class="phpdocumentor-element-found-in">
  225. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  226. :
  227. <span class="phpdocumentor-element-found-in__line">23</span>
  228. </aside>
  229. <code class="phpdocumentor-code phpdocumentor-signature ">
  230. <span class="phpdocumentor-signature__visibility">private</span>
  231. <span class="phpdocumentor-signature__type">int</span>
  232. <span class="phpdocumentor-signature__name">$dimension</span>
  233. </code>
  234. <section class="phpdocumentor-description"></section>
  235. <section class="phpdocumentor-description"></section>
  236. </article>
  237. <article
  238. class="
  239. phpdocumentor-element
  240. -property
  241. -private
  242. "
  243. >
  244. <h4 class="phpdocumentor-element__name" id="property_rowSize">
  245. $rowSize
  246. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_rowSize" class="headerlink"><i class="fas fa-link"></i></a>
  247. <span class="phpdocumentor-element__modifiers">
  248. </span>
  249. </h4>
  250. <aside class="phpdocumentor-element-found-in">
  251. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  252. :
  253. <span class="phpdocumentor-element-found-in__line">24</span>
  254. </aside>
  255. <code class="phpdocumentor-code phpdocumentor-signature ">
  256. <span class="phpdocumentor-signature__visibility">private</span>
  257. <span class="phpdocumentor-signature__type">int</span>
  258. <span class="phpdocumentor-signature__name">$rowSize</span>
  259. </code>
  260. <section class="phpdocumentor-description"></section>
  261. <section class="phpdocumentor-description"></section>
  262. </article>
  263. </section>
  264. <section class="phpdocumentor-methods">
  265. <h3 class="phpdocumentor-elements__header" id="methods">
  266. Methods
  267. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  268. </h3>
  269. <article
  270. class="phpdocumentor-element
  271. -method
  272. -public
  273. "
  274. >
  275. <h4 class="phpdocumentor-element__name" id="method___construct">
  276. __construct()
  277. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  278. </h4>
  279. <aside class="phpdocumentor-element-found-in">
  280. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  281. :
  282. <span class="phpdocumentor-element-found-in__line">30</span>
  283. </aside>
  284. <code class="phpdocumentor-code phpdocumentor-signature ">
  285. <span class="phpdocumentor-signature__visibility">public</span>
  286. <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">$dimension</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  287. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  288. <dl class="phpdocumentor-argument-list">
  289. <dt class="phpdocumentor-argument-list__entry">
  290. <span class="phpdocumentor-signature__argument__name">$dimension</span>
  291. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  292. </dt>
  293. <dd class="phpdocumentor-argument-list__definition">
  294. <section class="phpdocumentor-description"></section>
  295. </dd>
  296. </dl>
  297. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  298. <span class="phpdocumentor-signature__response_type">mixed</span>
  299. &mdash;
  300. </article>
  301. <article
  302. class="phpdocumentor-element
  303. -method
  304. -public
  305. "
  306. >
  307. <h4 class="phpdocumentor-element__name" id="method_buildFunctionPattern">
  308. buildFunctionPattern()
  309. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_buildFunctionPattern" class="headerlink"><i class="fas fa-link"></i></a>
  310. </h4>
  311. <aside class="phpdocumentor-element-found-in">
  312. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  313. :
  314. <span class="phpdocumentor-element-found-in__line">124</span>
  315. </aside>
  316. <p class="phpdocumentor-summary">See ISO 18004:2006 Annex E</p>
  317. <code class="phpdocumentor-code phpdocumentor-signature ">
  318. <span class="phpdocumentor-signature__visibility">public</span>
  319. <span class="phpdocumentor-signature__name">buildFunctionPattern</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$version</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span></code>
  320. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  321. <dl class="phpdocumentor-argument-list">
  322. <dt class="phpdocumentor-argument-list__entry">
  323. <span class="phpdocumentor-signature__argument__name">$version</span>
  324. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  325. </dt>
  326. <dd class="phpdocumentor-argument-list__definition">
  327. <section class="phpdocumentor-description"></section>
  328. </dd>
  329. </dl>
  330. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  331. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  332. &mdash;
  333. </article>
  334. <article
  335. class="phpdocumentor-element
  336. -method
  337. -public
  338. "
  339. >
  340. <h4 class="phpdocumentor-element__name" id="method_flip">
  341. flip()
  342. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_flip" class="headerlink"><i class="fas fa-link"></i></a>
  343. </h4>
  344. <aside class="phpdocumentor-element-found-in">
  345. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  346. :
  347. <span class="phpdocumentor-element-found-in__line">55</span>
  348. </aside>
  349. <p class="phpdocumentor-summary">&lt;p&gt;Flips the given bit. 1 &lt;&lt; (0xf9 &amp; 0x1f)&lt;/p&gt;</p>
  350. <code class="phpdocumentor-code phpdocumentor-signature ">
  351. <span class="phpdocumentor-signature__visibility">public</span>
  352. <span class="phpdocumentor-signature__name">flip</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</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">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  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">$x</span>
  357. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  358. </dt>
  359. <dd class="phpdocumentor-argument-list__definition">
  360. <section class="phpdocumentor-description"><p>; The horizontal component (i.e. which column)</p>
  361. </section>
  362. </dd>
  363. <dt class="phpdocumentor-argument-list__entry">
  364. <span class="phpdocumentor-signature__argument__name">$y</span>
  365. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  366. </dt>
  367. <dd class="phpdocumentor-argument-list__definition">
  368. <section class="phpdocumentor-description"><p>; The vertical component (i.e. which row)</p>
  369. </section>
  370. </dd>
  371. </dl>
  372. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  373. <span class="phpdocumentor-signature__response_type">void</span>
  374. &mdash;
  375. </article>
  376. <article
  377. class="phpdocumentor-element
  378. -method
  379. -public
  380. "
  381. >
  382. <h4 class="phpdocumentor-element__name" id="method_get">
  383. get()
  384. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_get" class="headerlink"><i class="fas fa-link"></i></a>
  385. </h4>
  386. <aside class="phpdocumentor-element-found-in">
  387. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  388. :
  389. <span class="phpdocumentor-element-found-in__line">113</span>
  390. </aside>
  391. <p class="phpdocumentor-summary">&lt;p&gt;Gets the requested bit, where true means black.&lt;/p&gt;</p>
  392. <code class="phpdocumentor-code phpdocumentor-signature ">
  393. <span class="phpdocumentor-signature__visibility">public</span>
  394. <span class="phpdocumentor-signature__name">get</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</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">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  395. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  396. <dl class="phpdocumentor-argument-list">
  397. <dt class="phpdocumentor-argument-list__entry">
  398. <span class="phpdocumentor-signature__argument__name">$x</span>
  399. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  400. </dt>
  401. <dd class="phpdocumentor-argument-list__definition">
  402. <section class="phpdocumentor-description"><p>The horizontal component (i.e. which column)</p>
  403. </section>
  404. </dd>
  405. <dt class="phpdocumentor-argument-list__entry">
  406. <span class="phpdocumentor-signature__argument__name">$y</span>
  407. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  408. </dt>
  409. <dd class="phpdocumentor-argument-list__definition">
  410. <section class="phpdocumentor-description"><p>The vertical component (i.e. which row)</p>
  411. </section>
  412. </dd>
  413. </dl>
  414. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  415. <span class="phpdocumentor-signature__response_type">bool</span>
  416. &mdash;
  417. <section class="phpdocumentor-description"><p>value of given bit in matrix</p>
  418. </section>
  419. </article>
  420. <article
  421. class="phpdocumentor-element
  422. -method
  423. -public
  424. "
  425. >
  426. <h4 class="phpdocumentor-element__name" id="method_getDimension">
  427. getDimension()
  428. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_getDimension" class="headerlink"><i class="fas fa-link"></i></a>
  429. </h4>
  430. <aside class="phpdocumentor-element-found-in">
  431. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  432. :
  433. <span class="phpdocumentor-element-found-in__line">101</span>
  434. </aside>
  435. <code class="phpdocumentor-code phpdocumentor-signature ">
  436. <span class="phpdocumentor-signature__visibility">public</span>
  437. <span class="phpdocumentor-signature__name">getDimension</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  438. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  439. <span class="phpdocumentor-signature__response_type">int</span>
  440. &mdash;
  441. <section class="phpdocumentor-description"><p>The dimension (width/height) of the matrix</p>
  442. </section>
  443. </article>
  444. <article
  445. class="phpdocumentor-element
  446. -method
  447. -public
  448. "
  449. >
  450. <h4 class="phpdocumentor-element__name" id="method_mirror">
  451. mirror()
  452. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_mirror" class="headerlink"><i class="fas fa-link"></i></a>
  453. </h4>
  454. <aside class="phpdocumentor-element-found-in">
  455. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  456. :
  457. <span class="phpdocumentor-element-found-in__line">171</span>
  458. </aside>
  459. <p class="phpdocumentor-summary">Mirror the bit matrix in order to attempt a second reading.</p>
  460. <code class="phpdocumentor-code phpdocumentor-signature ">
  461. <span class="phpdocumentor-signature__visibility">public</span>
  462. <span class="phpdocumentor-signature__name">mirror</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  463. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  464. <span class="phpdocumentor-signature__response_type">void</span>
  465. &mdash;
  466. </article>
  467. <article
  468. class="phpdocumentor-element
  469. -method
  470. -public
  471. "
  472. >
  473. <h4 class="phpdocumentor-element__name" id="method_set">
  474. set()
  475. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_set" class="headerlink"><i class="fas fa-link"></i></a>
  476. </h4>
  477. <aside class="phpdocumentor-element-found-in">
  478. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  479. :
  480. <span class="phpdocumentor-element-found-in__line">42</span>
  481. </aside>
  482. <p class="phpdocumentor-summary">&lt;p&gt;Sets the given bit to true.&lt;/p&gt;</p>
  483. <code class="phpdocumentor-code phpdocumentor-signature ">
  484. <span class="phpdocumentor-signature__visibility">public</span>
  485. <span class="phpdocumentor-signature__name">set</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$x</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">$y</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  486. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  487. <dl class="phpdocumentor-argument-list">
  488. <dt class="phpdocumentor-argument-list__entry">
  489. <span class="phpdocumentor-signature__argument__name">$x</span>
  490. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  491. </dt>
  492. <dd class="phpdocumentor-argument-list__definition">
  493. <section class="phpdocumentor-description"><p>; The horizontal component (i.e. which column)</p>
  494. </section>
  495. </dd>
  496. <dt class="phpdocumentor-argument-list__entry">
  497. <span class="phpdocumentor-signature__argument__name">$y</span>
  498. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  499. </dt>
  500. <dd class="phpdocumentor-argument-list__definition">
  501. <section class="phpdocumentor-description"><p>; The vertical component (i.e. which row)</p>
  502. </section>
  503. </dd>
  504. </dl>
  505. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  506. <span class="phpdocumentor-signature__response_type">void</span>
  507. &mdash;
  508. </article>
  509. <article
  510. class="phpdocumentor-element
  511. -method
  512. -public
  513. "
  514. >
  515. <h4 class="phpdocumentor-element__name" id="method_setRegion">
  516. setRegion()
  517. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_setRegion" class="headerlink"><i class="fas fa-link"></i></a>
  518. </h4>
  519. <aside class="phpdocumentor-element-found-in">
  520. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  521. :
  522. <span class="phpdocumentor-element-found-in__line">71</span>
  523. </aside>
  524. <p class="phpdocumentor-summary">&lt;p&gt;Sets a square region of the bit matrix to true.&lt;/p&gt;</p>
  525. <code class="phpdocumentor-code phpdocumentor-signature ">
  526. <span class="phpdocumentor-signature__visibility">public</span>
  527. <span class="phpdocumentor-signature__name">setRegion</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$left</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">$top</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">$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>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  528. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  529. <dl class="phpdocumentor-argument-list">
  530. <dt class="phpdocumentor-argument-list__entry">
  531. <span class="phpdocumentor-signature__argument__name">$left</span>
  532. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  533. </dt>
  534. <dd class="phpdocumentor-argument-list__definition">
  535. <section class="phpdocumentor-description"><p>; The horizontal position to begin at (inclusive)</p>
  536. </section>
  537. </dd>
  538. <dt class="phpdocumentor-argument-list__entry">
  539. <span class="phpdocumentor-signature__argument__name">$top</span>
  540. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  541. </dt>
  542. <dd class="phpdocumentor-argument-list__definition">
  543. <section class="phpdocumentor-description"><p>; The vertical position to begin at (inclusive)</p>
  544. </section>
  545. </dd>
  546. <dt class="phpdocumentor-argument-list__entry">
  547. <span class="phpdocumentor-signature__argument__name">$width</span>
  548. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  549. </dt>
  550. <dd class="phpdocumentor-argument-list__definition">
  551. <section class="phpdocumentor-description"><p>; The width of the region</p>
  552. </section>
  553. </dd>
  554. <dt class="phpdocumentor-argument-list__entry">
  555. <span class="phpdocumentor-signature__argument__name">$height</span>
  556. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  557. </dt>
  558. <dd class="phpdocumentor-argument-list__definition">
  559. <section class="phpdocumentor-description"><p>; The height of the region</p>
  560. </section>
  561. </dd>
  562. </dl>
  563. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  564. Tags
  565. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  566. </h5>
  567. <dl class="phpdocumentor-tag-list">
  568. <dt class="phpdocumentor-tag-list__entry">
  569. <span class="phpdocumentor-tag__name">throws</span>
  570. </dt>
  571. <dd class="phpdocumentor-tag-list__definition">
  572. <span class="phpdocumentor-tag-link"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
  573. </dd>
  574. </dl>
  575. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  576. <span class="phpdocumentor-signature__response_type">void</span>
  577. &mdash;
  578. </article>
  579. <article
  580. class="phpdocumentor-element
  581. -method
  582. -public
  583. "
  584. >
  585. <h4 class="phpdocumentor-element__name" id="method_unmask">
  586. unmask()
  587. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_unmask" class="headerlink"><i class="fas fa-link"></i></a>
  588. </h4>
  589. <aside class="phpdocumentor-element-found-in">
  590. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/BitMatrix.php"><a href="files/src-decoder-bitmatrix.html"><abbr title="src/Decoder/BitMatrix.php">BitMatrix.php</abbr></a></abbr>
  591. :
  592. <span class="phpdocumentor-element-found-in__line">188</span>
  593. </aside>
  594. <p class="phpdocumentor-summary">Implementations of this method reverse the data masking process applied to a QR Code and
  595. make its bits ready to read.</p>
  596. <code class="phpdocumentor-code phpdocumentor-signature ">
  597. <span class="phpdocumentor-signature__visibility">public</span>
  598. <span class="phpdocumentor-signature__name">unmask</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dimension</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$maskPattern</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  599. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  600. <dl class="phpdocumentor-argument-list">
  601. <dt class="phpdocumentor-argument-list__entry">
  602. <span class="phpdocumentor-signature__argument__name">$dimension</span>
  603. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  604. </dt>
  605. <dd class="phpdocumentor-argument-list__definition">
  606. <section class="phpdocumentor-description"></section>
  607. </dd>
  608. <dt class="phpdocumentor-argument-list__entry">
  609. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  610. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-MaskPattern.html"><abbr title="\chillerlan\QRCode\Common\MaskPattern">MaskPattern</abbr></a></span>
  611. </dt>
  612. <dd class="phpdocumentor-argument-list__definition">
  613. <section class="phpdocumentor-description"></section>
  614. </dd>
  615. </dl>
  616. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  617. <span class="phpdocumentor-signature__response_type">void</span>
  618. &mdash;
  619. </article>
  620. </section>
  621. <script type="text/javascript">
  622. function loadExternalCodeSnippets(line) {
  623. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  624. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  625. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  626. var language = 'php';
  627. var code = document.createElement('code');
  628. code.className = 'language-' + language;
  629. pre.textContent = '';
  630. pre.setAttribute('data-line', line)
  631. code.textContent = 'Loading…';
  632. pre.appendChild(code);
  633. var xhr = new XMLHttpRequest();
  634. xhr.open('GET', src, true);
  635. xhr.onreadystatechange = function () {
  636. if (xhr.readyState == 4) {
  637. if (xhr.status < 400 && xhr.responseText) {
  638. code.textContent = xhr.responseText;
  639. Prism.highlightElement(code);
  640. }
  641. else if (xhr.status >= 400) {
  642. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  643. }
  644. else {
  645. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  646. }
  647. }
  648. };
  649. xhr.send(null);
  650. });
  651. }
  652. var modals = document.querySelectorAll("[data-modal]");
  653. modals.forEach(function (trigger) {
  654. trigger.addEventListener("click", function (event) {
  655. //event.preventDefault();
  656. const modal = document.getElementById(trigger.dataset.modal);
  657. modal.classList.add("phpdocumentor-modal__open");
  658. loadExternalCodeSnippets(trigger.dataset.line)
  659. const exits = modal.querySelectorAll("[data-exit-button]");
  660. exits.forEach(function (exit) {
  661. exit.addEventListener("click", function (event) {
  662. event.preventDefault();
  663. modal.classList.remove("phpdocumentor-modal__open");
  664. });
  665. });
  666. });
  667. });
  668. </script>
  669. </article>
  670. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  671. <section class="phpdocumentor-search-results__dialog">
  672. <header class="phpdocumentor-search-results__header">
  673. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  674. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  675. </header>
  676. <section class="phpdocumentor-search-results__body">
  677. <ul class="phpdocumentor-search-results__entries"></ul>
  678. </section>
  679. </section>
  680. </section>
  681. </div>
  682. </div>
  683. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  684. </main>
  685. <script>
  686. cssVars({});
  687. </script>
  688. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  689. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  690. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  691. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  692. </body>
  693. </html>