chillerlan-QRCode-Detector-AlignmentPatternFinder.html 48 KB

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