src-detector-gridsampler.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. </section>
  82. <section class="phpdocumentor-sidebar__category">
  83. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  84. <h4 class="phpdocumentor-sidebar__root-namespace">
  85. <a href="packages/Application.html" class="">Application</a>
  86. </h4>
  87. </section>
  88. <section class="phpdocumentor-sidebar__category">
  89. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  90. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  91. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  92. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  93. </section>
  94. <section class="phpdocumentor-sidebar__category">
  95. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  96. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  97. </section>
  98. </aside>
  99. <div class="phpdocumentor-column -nine phpdocumentor-content">
  100. <section>
  101. <ul class="phpdocumentor-breadcrumbs">
  102. </ul>
  103. <article class="phpdocumentor-element -file">
  104. <h2 class="phpdocumentor-content__title">GridSampler.php</h2>
  105. <p class="phpdocumentor-summary">Class GridSampler</p>
  106. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  107. Tags
  108. <a href="files/src-detector-gridsampler.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  109. </h5>
  110. <dl class="phpdocumentor-tag-list">
  111. <dt class="phpdocumentor-tag-list__entry">
  112. <span class="phpdocumentor-tag__name">created</span>
  113. </dt>
  114. <dd class="phpdocumentor-tag-list__definition">
  115. <section class="phpdocumentor-description"><p>17.01.2021</p>
  116. </section>
  117. </dd>
  118. <dt class="phpdocumentor-tag-list__entry">
  119. <span class="phpdocumentor-tag__name">author</span>
  120. </dt>
  121. <dd class="phpdocumentor-tag-list__definition">
  122. <section class="phpdocumentor-description"><p>ZXing Authors</p>
  123. </section>
  124. </dd>
  125. <dt class="phpdocumentor-tag-list__entry">
  126. <span class="phpdocumentor-tag__name">author</span>
  127. </dt>
  128. <dd class="phpdocumentor-tag-list__definition">
  129. <section class="phpdocumentor-description"><p>Smiley <a href="mailto:smiley@chillerlan.net">smiley@chillerlan.net</a></p>
  130. </section>
  131. </dd>
  132. <dt class="phpdocumentor-tag-list__entry">
  133. <span class="phpdocumentor-tag__name">copyright</span>
  134. </dt>
  135. <dd class="phpdocumentor-tag-list__definition">
  136. <section class="phpdocumentor-description"><p>2021 Smiley</p>
  137. </section>
  138. </dd>
  139. <dt class="phpdocumentor-tag-list__entry">
  140. <span class="phpdocumentor-tag__name">license</span>
  141. </dt>
  142. <dd class="phpdocumentor-tag-list__definition">
  143. <section class="phpdocumentor-description"><p>Apache-2.0</p>
  144. </section>
  145. </dd>
  146. </dl>
  147. <h3 id="toc">
  148. Table of Contents
  149. <a href="files/src-detector-gridsampler.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  150. </h3>
  151. <h4 id="toc-classes">
  152. Classes
  153. <a href="files/src-detector-gridsampler.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
  154. </h4>
  155. <dl class="phpdocumentor-table-of-contents">
  156. <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/chillerlan-QRCode-Detector-GridSampler.html"><abbr title="\chillerlan\QRCode\Detector\GridSampler">GridSampler</abbr></a></dt><dd>Implementations of this class can, given locations of finder patterns for a QR code in an
  157. image, sample the right points in the image to reconstruct the QR code, accounting for
  158. perspective distortion. It is abstracted since it is relatively expensive and should be allowed
  159. to take advantage of platform-specific optimized implementations, like Sun&#039;s Java Advanced
  160. Imaging library, but which may not be available in other environments such as J2ME, and vice
  161. versa.</dd> </dl>
  162. <div class="phpdocumentor-modal" id="source-view">
  163. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  164. <div class="phpdocumentor-modal-container">
  165. <div class="phpdocumentor-modal-content">
  166. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Detector/GridSampler.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  167. </div>
  168. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  169. </div>
  170. </div>
  171. <script type="text/javascript">
  172. (function () {
  173. function loadExternalCodeSnippet(el, url, line) {
  174. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  175. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  176. const language = 'php';
  177. const code = document.createElement('code');
  178. code.className = 'language-' + language;
  179. pre.textContent = '';
  180. pre.setAttribute('data-line', line)
  181. code.textContent = 'Loading…';
  182. pre.appendChild(code);
  183. var xhr = new XMLHttpRequest();
  184. xhr.open('GET', src, true);
  185. xhr.onreadystatechange = function () {
  186. if (xhr.readyState !== 4) {
  187. return;
  188. }
  189. if (xhr.status < 400 && xhr.responseText) {
  190. code.textContent = xhr.responseText;
  191. Prism.highlightElement(code);
  192. return;
  193. }
  194. if (xhr.status === 404) {
  195. code.textContent = '✖ Error: File could not be found';
  196. return;
  197. }
  198. if (xhr.status >= 400) {
  199. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  200. return;
  201. }
  202. code.textContent = '✖ Error: An unknown error occurred';
  203. };
  204. xhr.send(null);
  205. });
  206. }
  207. const modalButtons = document.querySelectorAll("[data-modal]");
  208. const openedAsLocalFile = window.location.protocol === 'file:';
  209. if (modalButtons.length > 0 && openedAsLocalFile) {
  210. console.warn(
  211. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  212. 'browsers block XHR requests when a page is opened this way'
  213. );
  214. }
  215. modalButtons.forEach(function (trigger) {
  216. if (openedAsLocalFile) {
  217. trigger.setAttribute("hidden", "hidden");
  218. }
  219. trigger.addEventListener("click", function (event) {
  220. event.preventDefault();
  221. const modal = document.getElementById(trigger.dataset.modal);
  222. if (!modal) {
  223. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  224. return;
  225. }
  226. modal.classList.add("phpdocumentor-modal__open");
  227. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  228. const exits = modal.querySelectorAll("[data-exit-button]");
  229. exits.forEach(function (exit) {
  230. exit.addEventListener("click", function (event) {
  231. event.preventDefault();
  232. modal.classList.remove("phpdocumentor-modal__open");
  233. });
  234. });
  235. });
  236. });
  237. })();
  238. </script>
  239. </article>
  240. </section>
  241. <section class="phpdocumentor-on-this-page__sidebar">
  242. <section class="phpdocumentor-on-this-page__content">
  243. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  244. <ul class="phpdocumentor-list -clean">
  245. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  246. <li>
  247. <ul class="phpdocumentor-list -clean">
  248. <li><a href="files/src-detector-gridsampler.html#toc-classes">Classes</a></li>
  249. </ul>
  250. </li>
  251. </ul>
  252. </section>
  253. </section>
  254. </div>
  255. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  256. <section class="phpdocumentor-search-results__dialog">
  257. <header class="phpdocumentor-search-results__header">
  258. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  259. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  260. </header>
  261. <section class="phpdocumentor-search-results__body">
  262. <ul class="phpdocumentor-search-results__entries"></ul>
  263. </section>
  264. </section>
  265. </section>
  266. </div>
  267. <a href="files/src-detector-gridsampler.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  268. </main>
  269. <script>
  270. cssVars({});
  271. </script>
  272. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  273. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  274. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  275. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  276. </body>
  277. </html>