chillerlan-QRCode-Detector-AlignmentPatternFinder.html 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
  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-detector.html">Detector</a></li>
  105. </ul>
  106. <article class="phpdocumentor-element -class">
  107. <h2 class="phpdocumentor-content__title">
  108. AlignmentPatternFinder
  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. </h2>
  116. <div class="phpdocumentor-label-line">
  117. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  118. </div>
  119. <aside class="phpdocumentor-element-found-in">
  120. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  121. :
  122. <span class="phpdocumentor-element-found-in__line">31</span>
  123. </aside>
  124. <p class="phpdocumentor-summary">This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder
  125. patterns but are smaller and appear at regular intervals throughout the image.</p>
  126. <section class="phpdocumentor-description"><p>At the moment this only looks for the bottom-right alignment pattern.</p>
  127. <p>This is mostly a simplified copy of FinderPatternFinder. It is copied,
  128. pasted and stripped down here for maximum performance but does unfortunately duplicate
  129. some code.</p>
  130. <p>This class is thread-safe but not reentrant. Each thread must allocate its own object.</p>
  131. </section>
  132. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  133. Tags
  134. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  135. </h5>
  136. <dl class="phpdocumentor-tag-list">
  137. <dt class="phpdocumentor-tag-list__entry">
  138. <span class="phpdocumentor-tag__name">author</span>
  139. </dt>
  140. <dd class="phpdocumentor-tag-list__definition">
  141. <section class="phpdocumentor-description"><p>Sean Owen</p>
  142. </section>
  143. </dd>
  144. </dl>
  145. <h3 id="toc">
  146. Table of Contents
  147. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  148. </h3>
  149. <h4 id="toc-properties">
  150. Properties
  151. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  152. </h4>
  153. <dl class="phpdocumentor-table-of-contents">
  154. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  155. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_matrix">$matrix</a>
  156. <span>
  157. &nbsp;: <a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a> </span>
  158. </dt>
  159. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  160. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_moduleSize">$moduleSize</a>
  161. <span>
  162. &nbsp;: float </span>
  163. </dt>
  164. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  165. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_possibleCenters">$possibleCenters</a>
  166. <span>
  167. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>&gt; </span>
  168. </dt>
  169. </dl>
  170. <h4 id="toc-methods">
  171. Methods
  172. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  173. </h4>
  174. <dl class="phpdocumentor-table-of-contents">
  175. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  176. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method___construct">__construct()</a>
  177. <span>
  178. &nbsp;: mixed </span>
  179. </dt>
  180. <dd>Creates a finder that will look in a portion of the whole image.</dd>
  181. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  182. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_find">find()</a>
  183. <span>
  184. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null </span>
  185. </dt>
  186. <dd>This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since
  187. it&#039;s pretty performance-critical and so is written to be fast foremost.</dd>
  188. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  189. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_centerFromEnd">centerFromEnd()</a>
  190. <span>
  191. &nbsp;: float </span>
  192. </dt>
  193. <dd>Given a count of black/white/black pixels just seen and an end position,
  194. figures the location of the center of this black/white/black run.</dd>
  195. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  196. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_crossCheckVertical">crossCheckVertical()</a>
  197. <span>
  198. &nbsp;: float|null </span>
  199. </dt>
  200. <dd>After a horizontal scan finds a potential alignment pattern, this method
  201. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  202. alignment pattern to see if the same proportion is detected.</dd>
  203. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  204. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_foundPatternCross">foundPatternCross()</a>
  205. <span>
  206. &nbsp;: bool </span>
  207. </dt>
  208. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  209. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_handlePossibleCenter">handlePossibleCenter()</a>
  210. <span>
  211. &nbsp;: <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null </span>
  212. </dt>
  213. <dd>This is called when a horizontal scan finds a possible alignment pattern. It will
  214. cross-check with a vertical scan, and if successful, will see if this pattern had been
  215. found on a previous horizontal scan. If so, we consider it confirmed and conclude we have
  216. found the alignment pattern.</dd>
  217. </dl>
  218. <section class="phpdocumentor-properties">
  219. <h3 class="phpdocumentor-elements__header" id="properties">
  220. Properties
  221. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  222. </h3>
  223. <article
  224. class="
  225. phpdocumentor-element
  226. -property
  227. -private
  228. "
  229. >
  230. <h4 class="phpdocumentor-element__name" id="property_matrix">
  231. $matrix
  232. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_matrix" class="headerlink"><i class="fas fa-link"></i></a>
  233. <span class="phpdocumentor-element__modifiers">
  234. </span>
  235. </h4>
  236. <aside class="phpdocumentor-element-found-in">
  237. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  238. :
  239. <span class="phpdocumentor-element-found-in__line">33</span>
  240. </aside>
  241. <code class="phpdocumentor-code phpdocumentor-signature ">
  242. <span class="phpdocumentor-signature__visibility">private</span>
  243. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  244. <span class="phpdocumentor-signature__name">$matrix</span>
  245. </code>
  246. </article>
  247. <article
  248. class="
  249. phpdocumentor-element
  250. -property
  251. -private
  252. "
  253. >
  254. <h4 class="phpdocumentor-element__name" id="property_moduleSize">
  255. $moduleSize
  256. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_moduleSize" class="headerlink"><i class="fas fa-link"></i></a>
  257. <span class="phpdocumentor-element__modifiers">
  258. </span>
  259. </h4>
  260. <aside class="phpdocumentor-element-found-in">
  261. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  262. :
  263. <span class="phpdocumentor-element-found-in__line">34</span>
  264. </aside>
  265. <code class="phpdocumentor-code phpdocumentor-signature ">
  266. <span class="phpdocumentor-signature__visibility">private</span>
  267. <span class="phpdocumentor-signature__type">float</span>
  268. <span class="phpdocumentor-signature__name">$moduleSize</span>
  269. </code>
  270. </article>
  271. <article
  272. class="
  273. phpdocumentor-element
  274. -property
  275. -private
  276. "
  277. >
  278. <h4 class="phpdocumentor-element__name" id="property_possibleCenters">
  279. $possibleCenters
  280. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_possibleCenters" class="headerlink"><i class="fas fa-link"></i></a>
  281. <span class="phpdocumentor-element__modifiers">
  282. </span>
  283. </h4>
  284. <aside class="phpdocumentor-element-found-in">
  285. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  286. :
  287. <span class="phpdocumentor-element-found-in__line">36</span>
  288. </aside>
  289. <code class="phpdocumentor-code phpdocumentor-signature ">
  290. <span class="phpdocumentor-signature__visibility">private</span>
  291. <span class="phpdocumentor-signature__type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>&gt;</span>
  292. <span class="phpdocumentor-signature__name">$possibleCenters</span>
  293. </code>
  294. </article>
  295. </section>
  296. <section class="phpdocumentor-methods">
  297. <h3 class="phpdocumentor-elements__header" id="methods">
  298. Methods
  299. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  300. </h3>
  301. <article
  302. class="phpdocumentor-element
  303. -method
  304. -public
  305. "
  306. >
  307. <h4 class="phpdocumentor-element__name" id="method___construct">
  308. __construct()
  309. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method___construct" 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/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  313. :
  314. <span class="phpdocumentor-element-found-in__line">44</span>
  315. </aside>
  316. <p class="phpdocumentor-summary">Creates a finder that will look in a portion of the whole image.</p>
  317. <code class="phpdocumentor-code phpdocumentor-signature ">
  318. <span class="phpdocumentor-signature__visibility">public</span>
  319. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$matrix</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$moduleSize</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  320. <div class="phpdocumentor-label-line">
  321. </div>
  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">$matrix</span>
  326. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Decoder-BitMatrix.html"><abbr title="\chillerlan\QRCode\Decoder\BitMatrix">BitMatrix</abbr></a></span>
  327. </dt>
  328. <dd class="phpdocumentor-argument-list__definition">
  329. <section class="phpdocumentor-description"><p>image to search</p>
  330. </section>
  331. </dd>
  332. <dt class="phpdocumentor-argument-list__entry">
  333. <span class="phpdocumentor-signature__argument__name">$moduleSize</span>
  334. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  335. </dt>
  336. <dd class="phpdocumentor-argument-list__definition">
  337. <section class="phpdocumentor-description"><p>estimated module size so far</p>
  338. </section>
  339. </dd>
  340. </dl>
  341. </article>
  342. <article
  343. class="phpdocumentor-element
  344. -method
  345. -public
  346. "
  347. >
  348. <h4 class="phpdocumentor-element__name" id="method_find">
  349. find()
  350. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_find" class="headerlink"><i class="fas fa-link"></i></a>
  351. </h4>
  352. <aside class="phpdocumentor-element-found-in">
  353. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  354. :
  355. <span class="phpdocumentor-element-found-in__line">61</span>
  356. </aside>
  357. <p class="phpdocumentor-summary">This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since
  358. it&#039;s pretty performance-critical and so is written to be fast foremost.</p>
  359. <code class="phpdocumentor-code phpdocumentor-signature ">
  360. <span class="phpdocumentor-signature__visibility">public</span>
  361. <span class="phpdocumentor-signature__name">find</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$startX</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">$startY</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"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span></code>
  362. <div class="phpdocumentor-label-line">
  363. </div>
  364. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  365. <dl class="phpdocumentor-argument-list">
  366. <dt class="phpdocumentor-argument-list__entry">
  367. <span class="phpdocumentor-signature__argument__name">$startX</span>
  368. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  369. </dt>
  370. <dd class="phpdocumentor-argument-list__definition">
  371. <section class="phpdocumentor-description"><p>left column from which to start searching</p>
  372. </section>
  373. </dd>
  374. <dt class="phpdocumentor-argument-list__entry">
  375. <span class="phpdocumentor-signature__argument__name">$startY</span>
  376. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  377. </dt>
  378. <dd class="phpdocumentor-argument-list__definition">
  379. <section class="phpdocumentor-description"><p>top row from which to start searching</p>
  380. </section>
  381. </dd>
  382. <dt class="phpdocumentor-argument-list__entry">
  383. <span class="phpdocumentor-signature__argument__name">$width</span>
  384. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  385. </dt>
  386. <dd class="phpdocumentor-argument-list__definition">
  387. <section class="phpdocumentor-description"><p>width of region to search</p>
  388. </section>
  389. </dd>
  390. <dt class="phpdocumentor-argument-list__entry">
  391. <span class="phpdocumentor-signature__argument__name">$height</span>
  392. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  393. </dt>
  394. <dd class="phpdocumentor-argument-list__definition">
  395. <section class="phpdocumentor-description"><p>height of region to search</p>
  396. </section>
  397. </dd>
  398. </dl>
  399. <section>
  400. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  401. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span>
  402. </section>
  403. </article>
  404. <article
  405. class="phpdocumentor-element
  406. -method
  407. -private
  408. "
  409. >
  410. <h4 class="phpdocumentor-element__name" id="method_centerFromEnd">
  411. centerFromEnd()
  412. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_centerFromEnd" class="headerlink"><i class="fas fa-link"></i></a>
  413. </h4>
  414. <aside class="phpdocumentor-element-found-in">
  415. <abbr class="phpdocumentor-element-found-in__file" title="src/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  416. :
  417. <span class="phpdocumentor-element-found-in__line">208</span>
  418. </aside>
  419. <p class="phpdocumentor-summary">Given a count of black/white/black pixels just seen and an end position,
  420. figures the location of the center of this black/white/black run.</p>
  421. <code class="phpdocumentor-code phpdocumentor-signature ">
  422. <span class="phpdocumentor-signature__visibility">private</span>
  423. <span class="phpdocumentor-signature__name">centerFromEnd</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</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">$end</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float</span></code>
  424. <div class="phpdocumentor-label-line">
  425. </div>
  426. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  427. <dl class="phpdocumentor-argument-list">
  428. <dt class="phpdocumentor-argument-list__entry">
  429. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  430. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  431. </dt>
  432. <dd class="phpdocumentor-argument-list__definition">
  433. </dd>
  434. <dt class="phpdocumentor-argument-list__entry">
  435. <span class="phpdocumentor-signature__argument__name">$end</span>
  436. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  437. </dt>
  438. <dd class="phpdocumentor-argument-list__definition">
  439. </dd>
  440. </dl>
  441. <section>
  442. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  443. <span class="phpdocumentor-signature__response_type">float</span>
  444. </section>
  445. </article>
  446. <article
  447. class="phpdocumentor-element
  448. -method
  449. -private
  450. "
  451. >
  452. <h4 class="phpdocumentor-element__name" id="method_crossCheckVertical">
  453. crossCheckVertical()
  454. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_crossCheckVertical" 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/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  458. :
  459. <span class="phpdocumentor-element-found-in__line">225</span>
  460. </aside>
  461. <p class="phpdocumentor-summary">After a horizontal scan finds a potential alignment pattern, this method
  462. &quot;cross-checks&quot; by scanning down vertically through the center of the possible
  463. alignment pattern to see if the same proportion is detected.</p>
  464. <code class="phpdocumentor-code phpdocumentor-signature ">
  465. <span class="phpdocumentor-signature__visibility">private</span>
  466. <span class="phpdocumentor-signature__name">crossCheckVertical</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$startI</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">$centerJ</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">$maxCount</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">$originalStateCountTotal</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">float|null</span></code>
  467. <div class="phpdocumentor-label-line">
  468. </div>
  469. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  470. <dl class="phpdocumentor-argument-list">
  471. <dt class="phpdocumentor-argument-list__entry">
  472. <span class="phpdocumentor-signature__argument__name">$startI</span>
  473. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  474. </dt>
  475. <dd class="phpdocumentor-argument-list__definition">
  476. <section class="phpdocumentor-description"><p>row where an alignment pattern was detected</p>
  477. </section>
  478. </dd>
  479. <dt class="phpdocumentor-argument-list__entry">
  480. <span class="phpdocumentor-signature__argument__name">$centerJ</span>
  481. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  482. </dt>
  483. <dd class="phpdocumentor-argument-list__definition">
  484. <section class="phpdocumentor-description"><p>center of the section that appears to cross an alignment pattern</p>
  485. </section>
  486. </dd>
  487. <dt class="phpdocumentor-argument-list__entry">
  488. <span class="phpdocumentor-signature__argument__name">$maxCount</span>
  489. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  490. </dt>
  491. <dd class="phpdocumentor-argument-list__definition">
  492. <section class="phpdocumentor-description"><p>maximum reasonable number of modules that should be
  493. observed in any reading state, based on the results of the horizontal scan</p>
  494. </section>
  495. </dd>
  496. <dt class="phpdocumentor-argument-list__entry">
  497. <span class="phpdocumentor-signature__argument__name">$originalStateCountTotal</span>
  498. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  499. </dt>
  500. <dd class="phpdocumentor-argument-list__definition">
  501. </dd>
  502. </dl>
  503. <section>
  504. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  505. <span class="phpdocumentor-signature__response_type">float|null</span>
  506. &mdash;
  507. <section class="phpdocumentor-description"><p>vertical center of alignment pattern, or null if not found</p>
  508. </section>
  509. </section>
  510. </article>
  511. <article
  512. class="phpdocumentor-element
  513. -method
  514. -private
  515. "
  516. >
  517. <h4 class="phpdocumentor-element__name" id="method_foundPatternCross">
  518. foundPatternCross()
  519. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_foundPatternCross" 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/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  523. :
  524. <span class="phpdocumentor-element-found-in__line">152</span>
  525. </aside>
  526. <code class="phpdocumentor-code phpdocumentor-signature ">
  527. <span class="phpdocumentor-signature__visibility">private</span>
  528. <span class="phpdocumentor-signature__name">foundPatternCross</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  529. <div class="phpdocumentor-label-line">
  530. </div>
  531. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  532. <dl class="phpdocumentor-argument-list">
  533. <dt class="phpdocumentor-argument-list__entry">
  534. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  535. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  536. </dt>
  537. <dd class="phpdocumentor-argument-list__definition">
  538. <section class="phpdocumentor-description"><p>count of black/white/black pixels just read</p>
  539. </section>
  540. </dd>
  541. </dl>
  542. <section>
  543. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  544. <span class="phpdocumentor-signature__response_type">bool</span>
  545. &mdash;
  546. <section class="phpdocumentor-description"><p>true if the proportions of the counts is close enough to the 1/1/1 ratios
  547. used by alignment patterns to be considered a match</p>
  548. </section>
  549. </section>
  550. </article>
  551. <article
  552. class="phpdocumentor-element
  553. -method
  554. -private
  555. "
  556. >
  557. <h4 class="phpdocumentor-element__name" id="method_handlePossibleCenter">
  558. handlePossibleCenter()
  559. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_handlePossibleCenter" 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/Detector/AlignmentPatternFinder.php"><a href="files/src-detector-alignmentpatternfinder.html"><abbr title="src/Detector/AlignmentPatternFinder.php">AlignmentPatternFinder.php</abbr></a></abbr>
  563. :
  564. <span class="phpdocumentor-element-found-in__line">176</span>
  565. </aside>
  566. <p class="phpdocumentor-summary">This is called when a horizontal scan finds a possible alignment pattern. It will
  567. cross-check with a vertical scan, and if successful, will see if this pattern had been
  568. found on a previous horizontal scan. If so, we consider it confirmed and conclude we have
  569. found the alignment pattern.</p>
  570. <code class="phpdocumentor-code phpdocumentor-signature ">
  571. <span class="phpdocumentor-signature__visibility">private</span>
  572. <span class="phpdocumentor-signature__name">handlePossibleCenter</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$stateCount</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">$i</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">$j</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span></code>
  573. <div class="phpdocumentor-label-line">
  574. </div>
  575. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  576. <dl class="phpdocumentor-argument-list">
  577. <dt class="phpdocumentor-argument-list__entry">
  578. <span class="phpdocumentor-signature__argument__name">$stateCount</span>
  579. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, int&gt;</span>
  580. </dt>
  581. <dd class="phpdocumentor-argument-list__definition">
  582. <section class="phpdocumentor-description"><p>reading state module counts from horizontal scan</p>
  583. </section>
  584. </dd>
  585. <dt class="phpdocumentor-argument-list__entry">
  586. <span class="phpdocumentor-signature__argument__name">$i</span>
  587. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  588. </dt>
  589. <dd class="phpdocumentor-argument-list__definition">
  590. <section class="phpdocumentor-description"><p>row where alignment pattern may be found</p>
  591. </section>
  592. </dd>
  593. <dt class="phpdocumentor-argument-list__entry">
  594. <span class="phpdocumentor-signature__argument__name">$j</span>
  595. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  596. </dt>
  597. <dd class="phpdocumentor-argument-list__definition">
  598. <section class="phpdocumentor-description"><p>end of possible alignment pattern in row</p>
  599. </section>
  600. </dd>
  601. </dl>
  602. <section>
  603. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  604. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Detector-AlignmentPattern.html"><abbr title="\chillerlan\QRCode\Detector\AlignmentPattern">AlignmentPattern</abbr></a>|null</span>
  605. &mdash;
  606. <section class="phpdocumentor-description"><p>if we have found the same pattern twice, or null if not</p>
  607. </section>
  608. </section>
  609. </article>
  610. </section>
  611. <div class="phpdocumentor-modal" id="source-view">
  612. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  613. <div class="phpdocumentor-modal-container">
  614. <div class="phpdocumentor-modal-content">
  615. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Detector/AlignmentPatternFinder.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  616. </div>
  617. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  618. </div>
  619. </div>
  620. <script type="text/javascript">
  621. (function () {
  622. function loadExternalCodeSnippet(el, url, line) {
  623. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  624. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  625. const language = 'php';
  626. const code = document.createElement('code');
  627. code.className = 'language-' + language;
  628. pre.textContent = '';
  629. pre.setAttribute('data-line', line)
  630. code.textContent = 'Loading…';
  631. pre.appendChild(code);
  632. var xhr = new XMLHttpRequest();
  633. xhr.open('GET', src, true);
  634. xhr.onreadystatechange = function () {
  635. if (xhr.readyState !== 4) {
  636. return;
  637. }
  638. if (xhr.status < 400 && xhr.responseText) {
  639. code.textContent = xhr.responseText;
  640. Prism.highlightElement(code);
  641. return;
  642. }
  643. if (xhr.status === 404) {
  644. code.textContent = '✖ Error: File could not be found';
  645. return;
  646. }
  647. if (xhr.status >= 400) {
  648. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  649. return;
  650. }
  651. code.textContent = '✖ Error: An unknown error occurred';
  652. };
  653. xhr.send(null);
  654. });
  655. }
  656. const modalButtons = document.querySelectorAll("[data-modal]");
  657. const openedAsLocalFile = window.location.protocol === 'file:';
  658. if (modalButtons.length > 0 && openedAsLocalFile) {
  659. console.warn(
  660. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  661. 'browsers block XHR requests when a page is opened this way'
  662. );
  663. }
  664. modalButtons.forEach(function (trigger) {
  665. if (openedAsLocalFile) {
  666. trigger.setAttribute("hidden", "hidden");
  667. }
  668. trigger.addEventListener("click", function (event) {
  669. event.preventDefault();
  670. const modal = document.getElementById(trigger.dataset.modal);
  671. if (!modal) {
  672. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  673. return;
  674. }
  675. modal.classList.add("phpdocumentor-modal__open");
  676. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  677. const exits = modal.querySelectorAll("[data-exit-button]");
  678. exits.forEach(function (exit) {
  679. exit.addEventListener("click", function (event) {
  680. event.preventDefault();
  681. modal.classList.remove("phpdocumentor-modal__open");
  682. });
  683. });
  684. });
  685. });
  686. })();
  687. </script>
  688. </article>
  689. </section>
  690. <section class="phpdocumentor-on-this-page__sidebar">
  691. <section class="phpdocumentor-on-this-page__content">
  692. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  693. <ul class="phpdocumentor-list -clean">
  694. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  695. <li>
  696. <ul class="phpdocumentor-list -clean">
  697. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#toc-properties">Properties</a></li>
  698. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#toc-methods">Methods</a></li>
  699. </ul>
  700. </li>
  701. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  702. <li>
  703. <ul class="phpdocumentor-list -clean">
  704. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_matrix">$matrix<a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html"></li>
  705. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_moduleSize">$moduleSize<a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html"></li>
  706. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#property_possibleCenters">$possibleCenters<a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html"></li>
  707. </ul>
  708. </li>
  709. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  710. <li>
  711. <ul class="phpdocumentor-list -clean">
  712. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method___construct">__construct()</a></li>
  713. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_find">find()</a></li>
  714. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_centerFromEnd">centerFromEnd()</a></li>
  715. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_crossCheckVertical">crossCheckVertical()</a></li>
  716. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_foundPatternCross">foundPatternCross()</a></li>
  717. <li><a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#method_handlePossibleCenter">handlePossibleCenter()</a></li>
  718. </ul>
  719. </li>
  720. </ul>
  721. </section>
  722. </section>
  723. </div>
  724. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  725. <section class="phpdocumentor-search-results__dialog">
  726. <header class="phpdocumentor-search-results__header">
  727. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  728. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  729. </header>
  730. <section class="phpdocumentor-search-results__body">
  731. <ul class="phpdocumentor-search-results__entries"></ul>
  732. </section>
  733. </section>
  734. </section>
  735. </div>
  736. <a href="classes/chillerlan-QRCode-Detector-AlignmentPatternFinder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  737. </main>
  738. <script>
  739. cssVars({});
  740. </script>
  741. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  742. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  743. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  744. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  745. </body>
  746. </html>