chillerlan-QRCode-Decoder-BitMatrix.html 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  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>&lt;p&gt;Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations
  178. of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,
  179. including areas used for finder patterns, timing patterns, etc. These areas should be unused
  180. after the point they are unmasked anyway.&lt;/p&gt;</dd>
  181. </dl>
  182. <section class="phpdocumentor-properties">
  183. <h3 class="phpdocumentor-elements__header" id="properties">
  184. Properties
  185. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  186. </h3>
  187. <article
  188. class="
  189. phpdocumentor-element
  190. -property
  191. -private
  192. "
  193. >
  194. <h4 class="phpdocumentor-element__name" id="property_bits">
  195. $bits
  196. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_bits" class="headerlink"><i class="fas fa-link"></i></a>
  197. <span class="phpdocumentor-element__modifiers">
  198. </span>
  199. </h4>
  200. <aside class="phpdocumentor-element-found-in">
  201. <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>
  202. :
  203. <span class="phpdocumentor-element-found-in__line">25</span>
  204. </aside>
  205. <code class="phpdocumentor-code phpdocumentor-signature ">
  206. <span class="phpdocumentor-signature__visibility">private</span>
  207. <span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
  208. <span class="phpdocumentor-signature__name">$bits</span>
  209. </code>
  210. <section class="phpdocumentor-description"></section>
  211. <section class="phpdocumentor-description"></section>
  212. </article>
  213. <article
  214. class="
  215. phpdocumentor-element
  216. -property
  217. -private
  218. "
  219. >
  220. <h4 class="phpdocumentor-element__name" id="property_dimension">
  221. $dimension
  222. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_dimension" class="headerlink"><i class="fas fa-link"></i></a>
  223. <span class="phpdocumentor-element__modifiers">
  224. </span>
  225. </h4>
  226. <aside class="phpdocumentor-element-found-in">
  227. <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>
  228. :
  229. <span class="phpdocumentor-element-found-in__line">23</span>
  230. </aside>
  231. <code class="phpdocumentor-code phpdocumentor-signature ">
  232. <span class="phpdocumentor-signature__visibility">private</span>
  233. <span class="phpdocumentor-signature__type">int</span>
  234. <span class="phpdocumentor-signature__name">$dimension</span>
  235. </code>
  236. <section class="phpdocumentor-description"></section>
  237. <section class="phpdocumentor-description"></section>
  238. </article>
  239. <article
  240. class="
  241. phpdocumentor-element
  242. -property
  243. -private
  244. "
  245. >
  246. <h4 class="phpdocumentor-element__name" id="property_rowSize">
  247. $rowSize
  248. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#property_rowSize" class="headerlink"><i class="fas fa-link"></i></a>
  249. <span class="phpdocumentor-element__modifiers">
  250. </span>
  251. </h4>
  252. <aside class="phpdocumentor-element-found-in">
  253. <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>
  254. :
  255. <span class="phpdocumentor-element-found-in__line">24</span>
  256. </aside>
  257. <code class="phpdocumentor-code phpdocumentor-signature ">
  258. <span class="phpdocumentor-signature__visibility">private</span>
  259. <span class="phpdocumentor-signature__type">int</span>
  260. <span class="phpdocumentor-signature__name">$rowSize</span>
  261. </code>
  262. <section class="phpdocumentor-description"></section>
  263. <section class="phpdocumentor-description"></section>
  264. </article>
  265. </section>
  266. <section class="phpdocumentor-methods">
  267. <h3 class="phpdocumentor-elements__header" id="methods">
  268. Methods
  269. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  270. </h3>
  271. <article
  272. class="phpdocumentor-element
  273. -method
  274. -public
  275. "
  276. >
  277. <h4 class="phpdocumentor-element__name" id="method___construct">
  278. __construct()
  279. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  280. </h4>
  281. <aside class="phpdocumentor-element-found-in">
  282. <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>
  283. :
  284. <span class="phpdocumentor-element-found-in__line">30</span>
  285. </aside>
  286. <code class="phpdocumentor-code phpdocumentor-signature ">
  287. <span class="phpdocumentor-signature__visibility">public</span>
  288. <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>
  289. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  290. <dl class="phpdocumentor-argument-list">
  291. <dt class="phpdocumentor-argument-list__entry">
  292. <span class="phpdocumentor-signature__argument__name">$dimension</span>
  293. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  294. </dt>
  295. <dd class="phpdocumentor-argument-list__definition">
  296. <section class="phpdocumentor-description"></section>
  297. </dd>
  298. </dl>
  299. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  300. <span class="phpdocumentor-signature__response_type">mixed</span>
  301. &mdash;
  302. </article>
  303. <article
  304. class="phpdocumentor-element
  305. -method
  306. -public
  307. "
  308. >
  309. <h4 class="phpdocumentor-element__name" id="method_buildFunctionPattern">
  310. buildFunctionPattern()
  311. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_buildFunctionPattern" class="headerlink"><i class="fas fa-link"></i></a>
  312. </h4>
  313. <aside class="phpdocumentor-element-found-in">
  314. <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>
  315. :
  316. <span class="phpdocumentor-element-found-in__line">124</span>
  317. </aside>
  318. <p class="phpdocumentor-summary">See ISO 18004:2006 Annex E</p>
  319. <code class="phpdocumentor-code phpdocumentor-signature ">
  320. <span class="phpdocumentor-signature__visibility">public</span>
  321. <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>
  322. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  323. <dl class="phpdocumentor-argument-list">
  324. <dt class="phpdocumentor-argument-list__entry">
  325. <span class="phpdocumentor-signature__argument__name">$version</span>
  326. : <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>
  327. </dt>
  328. <dd class="phpdocumentor-argument-list__definition">
  329. <section class="phpdocumentor-description"></section>
  330. </dd>
  331. </dl>
  332. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  333. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  334. &mdash;
  335. </article>
  336. <article
  337. class="phpdocumentor-element
  338. -method
  339. -public
  340. "
  341. >
  342. <h4 class="phpdocumentor-element__name" id="method_flip">
  343. flip()
  344. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_flip" class="headerlink"><i class="fas fa-link"></i></a>
  345. </h4>
  346. <aside class="phpdocumentor-element-found-in">
  347. <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>
  348. :
  349. <span class="phpdocumentor-element-found-in__line">55</span>
  350. </aside>
  351. <p class="phpdocumentor-summary">&lt;p&gt;Flips the given bit. 1 &lt;&lt; (0xf9 &amp; 0x1f)&lt;/p&gt;</p>
  352. <code class="phpdocumentor-code phpdocumentor-signature ">
  353. <span class="phpdocumentor-signature__visibility">public</span>
  354. <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>
  355. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  356. <dl class="phpdocumentor-argument-list">
  357. <dt class="phpdocumentor-argument-list__entry">
  358. <span class="phpdocumentor-signature__argument__name">$x</span>
  359. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  360. </dt>
  361. <dd class="phpdocumentor-argument-list__definition">
  362. <section class="phpdocumentor-description"><p>; The horizontal component (i.e. which column)</p>
  363. </section>
  364. </dd>
  365. <dt class="phpdocumentor-argument-list__entry">
  366. <span class="phpdocumentor-signature__argument__name">$y</span>
  367. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  368. </dt>
  369. <dd class="phpdocumentor-argument-list__definition">
  370. <section class="phpdocumentor-description"><p>; The vertical component (i.e. which row)</p>
  371. </section>
  372. </dd>
  373. </dl>
  374. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  375. <span class="phpdocumentor-signature__response_type">void</span>
  376. &mdash;
  377. </article>
  378. <article
  379. class="phpdocumentor-element
  380. -method
  381. -public
  382. "
  383. >
  384. <h4 class="phpdocumentor-element__name" id="method_get">
  385. get()
  386. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_get" class="headerlink"><i class="fas fa-link"></i></a>
  387. </h4>
  388. <aside class="phpdocumentor-element-found-in">
  389. <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>
  390. :
  391. <span class="phpdocumentor-element-found-in__line">113</span>
  392. </aside>
  393. <p class="phpdocumentor-summary">&lt;p&gt;Gets the requested bit, where true means black.&lt;/p&gt;</p>
  394. <code class="phpdocumentor-code phpdocumentor-signature ">
  395. <span class="phpdocumentor-signature__visibility">public</span>
  396. <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>
  397. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  398. <dl class="phpdocumentor-argument-list">
  399. <dt class="phpdocumentor-argument-list__entry">
  400. <span class="phpdocumentor-signature__argument__name">$x</span>
  401. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  402. </dt>
  403. <dd class="phpdocumentor-argument-list__definition">
  404. <section class="phpdocumentor-description"><p>The horizontal component (i.e. which column)</p>
  405. </section>
  406. </dd>
  407. <dt class="phpdocumentor-argument-list__entry">
  408. <span class="phpdocumentor-signature__argument__name">$y</span>
  409. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  410. </dt>
  411. <dd class="phpdocumentor-argument-list__definition">
  412. <section class="phpdocumentor-description"><p>The vertical component (i.e. which row)</p>
  413. </section>
  414. </dd>
  415. </dl>
  416. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  417. <span class="phpdocumentor-signature__response_type">bool</span>
  418. &mdash;
  419. <section class="phpdocumentor-description"><p>value of given bit in matrix</p>
  420. </section>
  421. </article>
  422. <article
  423. class="phpdocumentor-element
  424. -method
  425. -public
  426. "
  427. >
  428. <h4 class="phpdocumentor-element__name" id="method_getDimension">
  429. getDimension()
  430. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_getDimension" class="headerlink"><i class="fas fa-link"></i></a>
  431. </h4>
  432. <aside class="phpdocumentor-element-found-in">
  433. <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>
  434. :
  435. <span class="phpdocumentor-element-found-in__line">101</span>
  436. </aside>
  437. <code class="phpdocumentor-code phpdocumentor-signature ">
  438. <span class="phpdocumentor-signature__visibility">public</span>
  439. <span class="phpdocumentor-signature__name">getDimension</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  440. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  441. <span class="phpdocumentor-signature__response_type">int</span>
  442. &mdash;
  443. <section class="phpdocumentor-description"><p>The dimension (width/height) of the matrix</p>
  444. </section>
  445. </article>
  446. <article
  447. class="phpdocumentor-element
  448. -method
  449. -public
  450. "
  451. >
  452. <h4 class="phpdocumentor-element__name" id="method_mirror">
  453. mirror()
  454. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_mirror" class="headerlink"><i class="fas fa-link"></i></a>
  455. </h4>
  456. <aside class="phpdocumentor-element-found-in">
  457. <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>
  458. :
  459. <span class="phpdocumentor-element-found-in__line">171</span>
  460. </aside>
  461. <p class="phpdocumentor-summary">Mirror the bit matrix in order to attempt a second reading.</p>
  462. <code class="phpdocumentor-code phpdocumentor-signature ">
  463. <span class="phpdocumentor-signature__visibility">public</span>
  464. <span class="phpdocumentor-signature__name">mirror</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  465. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  466. <span class="phpdocumentor-signature__response_type">void</span>
  467. &mdash;
  468. </article>
  469. <article
  470. class="phpdocumentor-element
  471. -method
  472. -public
  473. "
  474. >
  475. <h4 class="phpdocumentor-element__name" id="method_set">
  476. set()
  477. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_set" class="headerlink"><i class="fas fa-link"></i></a>
  478. </h4>
  479. <aside class="phpdocumentor-element-found-in">
  480. <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>
  481. :
  482. <span class="phpdocumentor-element-found-in__line">42</span>
  483. </aside>
  484. <p class="phpdocumentor-summary">&lt;p&gt;Sets the given bit to true.&lt;/p&gt;</p>
  485. <code class="phpdocumentor-code phpdocumentor-signature ">
  486. <span class="phpdocumentor-signature__visibility">public</span>
  487. <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>
  488. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  489. <dl class="phpdocumentor-argument-list">
  490. <dt class="phpdocumentor-argument-list__entry">
  491. <span class="phpdocumentor-signature__argument__name">$x</span>
  492. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  493. </dt>
  494. <dd class="phpdocumentor-argument-list__definition">
  495. <section class="phpdocumentor-description"><p>; The horizontal component (i.e. which column)</p>
  496. </section>
  497. </dd>
  498. <dt class="phpdocumentor-argument-list__entry">
  499. <span class="phpdocumentor-signature__argument__name">$y</span>
  500. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  501. </dt>
  502. <dd class="phpdocumentor-argument-list__definition">
  503. <section class="phpdocumentor-description"><p>; The vertical component (i.e. which row)</p>
  504. </section>
  505. </dd>
  506. </dl>
  507. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  508. <span class="phpdocumentor-signature__response_type">void</span>
  509. &mdash;
  510. </article>
  511. <article
  512. class="phpdocumentor-element
  513. -method
  514. -public
  515. "
  516. >
  517. <h4 class="phpdocumentor-element__name" id="method_setRegion">
  518. setRegion()
  519. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_setRegion" class="headerlink"><i class="fas fa-link"></i></a>
  520. </h4>
  521. <aside class="phpdocumentor-element-found-in">
  522. <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>
  523. :
  524. <span class="phpdocumentor-element-found-in__line">71</span>
  525. </aside>
  526. <p class="phpdocumentor-summary">&lt;p&gt;Sets a square region of the bit matrix to true.&lt;/p&gt;</p>
  527. <code class="phpdocumentor-code phpdocumentor-signature ">
  528. <span class="phpdocumentor-signature__visibility">public</span>
  529. <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>
  530. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  531. <dl class="phpdocumentor-argument-list">
  532. <dt class="phpdocumentor-argument-list__entry">
  533. <span class="phpdocumentor-signature__argument__name">$left</span>
  534. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  535. </dt>
  536. <dd class="phpdocumentor-argument-list__definition">
  537. <section class="phpdocumentor-description"><p>; The horizontal position to begin at (inclusive)</p>
  538. </section>
  539. </dd>
  540. <dt class="phpdocumentor-argument-list__entry">
  541. <span class="phpdocumentor-signature__argument__name">$top</span>
  542. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  543. </dt>
  544. <dd class="phpdocumentor-argument-list__definition">
  545. <section class="phpdocumentor-description"><p>; The vertical position to begin at (inclusive)</p>
  546. </section>
  547. </dd>
  548. <dt class="phpdocumentor-argument-list__entry">
  549. <span class="phpdocumentor-signature__argument__name">$width</span>
  550. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  551. </dt>
  552. <dd class="phpdocumentor-argument-list__definition">
  553. <section class="phpdocumentor-description"><p>; The width of the region</p>
  554. </section>
  555. </dd>
  556. <dt class="phpdocumentor-argument-list__entry">
  557. <span class="phpdocumentor-signature__argument__name">$height</span>
  558. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  559. </dt>
  560. <dd class="phpdocumentor-argument-list__definition">
  561. <section class="phpdocumentor-description"><p>; The height of the region</p>
  562. </section>
  563. </dd>
  564. </dl>
  565. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  566. Tags
  567. <a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
  568. </h5>
  569. <dl class="phpdocumentor-tag-list">
  570. <dt class="phpdocumentor-tag-list__entry">
  571. <span class="phpdocumentor-tag__name">throws</span>
  572. </dt>
  573. <dd class="phpdocumentor-tag-list__definition">
  574. <span class="phpdocumentor-tag-link"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
  575. </dd>
  576. </dl>
  577. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  578. <span class="phpdocumentor-signature__response_type">void</span>
  579. &mdash;
  580. </article>
  581. <article
  582. class="phpdocumentor-element
  583. -method
  584. -public
  585. "
  586. >
  587. <h4 class="phpdocumentor-element__name" id="method_unmask">
  588. unmask()
  589. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#method_unmask" class="headerlink"><i class="fas fa-link"></i></a>
  590. </h4>
  591. <aside class="phpdocumentor-element-found-in">
  592. <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>
  593. :
  594. <span class="phpdocumentor-element-found-in__line">196</span>
  595. </aside>
  596. <p class="phpdocumentor-summary">&lt;p&gt;Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations
  597. of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,
  598. including areas used for finder patterns, timing patterns, etc. These areas should be unused
  599. after the point they are unmasked anyway.&lt;/p&gt;</p>
  600. <code class="phpdocumentor-code phpdocumentor-signature ">
  601. <span class="phpdocumentor-signature__visibility">public</span>
  602. <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>
  603. <section class="phpdocumentor-description"><p>Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position
  604. and j is row position. In fact, as the text says, i is row position and j is column position.</p>
  605. <p>Implementations of this method reverse the data masking process applied to a QR Code and
  606. make its bits ready to read.</p>
  607. </section>
  608. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  609. <dl class="phpdocumentor-argument-list">
  610. <dt class="phpdocumentor-argument-list__entry">
  611. <span class="phpdocumentor-signature__argument__name">$dimension</span>
  612. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  613. </dt>
  614. <dd class="phpdocumentor-argument-list__definition">
  615. <section class="phpdocumentor-description"></section>
  616. </dd>
  617. <dt class="phpdocumentor-argument-list__entry">
  618. <span class="phpdocumentor-signature__argument__name">$maskPattern</span>
  619. : <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>
  620. </dt>
  621. <dd class="phpdocumentor-argument-list__definition">
  622. <section class="phpdocumentor-description"></section>
  623. </dd>
  624. </dl>
  625. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  626. <span class="phpdocumentor-signature__response_type">void</span>
  627. &mdash;
  628. </article>
  629. </section>
  630. <script type="text/javascript">
  631. function loadExternalCodeSnippets(line) {
  632. Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
  633. var src = pre.getAttribute('data-src').replace( /\\/g, '/');
  634. var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
  635. var language = 'php';
  636. var code = document.createElement('code');
  637. code.className = 'language-' + language;
  638. pre.textContent = '';
  639. pre.setAttribute('data-line', line)
  640. code.textContent = 'Loading…';
  641. pre.appendChild(code);
  642. var xhr = new XMLHttpRequest();
  643. xhr.open('GET', src, true);
  644. xhr.onreadystatechange = function () {
  645. if (xhr.readyState == 4) {
  646. if (xhr.status < 400 && xhr.responseText) {
  647. code.textContent = xhr.responseText;
  648. Prism.highlightElement(code);
  649. }
  650. else if (xhr.status >= 400) {
  651. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  652. }
  653. else {
  654. code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
  655. }
  656. }
  657. };
  658. xhr.send(null);
  659. });
  660. }
  661. var modals = document.querySelectorAll("[data-modal]");
  662. modals.forEach(function (trigger) {
  663. trigger.addEventListener("click", function (event) {
  664. //event.preventDefault();
  665. const modal = document.getElementById(trigger.dataset.modal);
  666. modal.classList.add("phpdocumentor-modal__open");
  667. loadExternalCodeSnippets(trigger.dataset.line)
  668. const exits = modal.querySelectorAll("[data-exit-button]");
  669. exits.forEach(function (exit) {
  670. exit.addEventListener("click", function (event) {
  671. event.preventDefault();
  672. modal.classList.remove("phpdocumentor-modal__open");
  673. });
  674. });
  675. });
  676. });
  677. </script>
  678. </article>
  679. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  680. <section class="phpdocumentor-search-results__dialog">
  681. <header class="phpdocumentor-search-results__header">
  682. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  683. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  684. </header>
  685. <section class="phpdocumentor-search-results__body">
  686. <ul class="phpdocumentor-search-results__entries"></ul>
  687. </section>
  688. </section>
  689. </section>
  690. </div>
  691. </div>
  692. <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  693. </main>
  694. <script>
  695. cssVars({});
  696. </script>
  697. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  698. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  699. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  700. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  701. </body>
  702. </html>