chillerlan-QRCode-Detector-AlignmentPatternFinder.html 49 KB

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