MCPcopy Create free account
hub / github.com/codemistic/Web-Development / putAlignmentMarker

Method putAlignmentMarker

text-to-qr/lib/phpqrcode/qrspec.php:280–296  ·  view source on GitHub ↗

-------------------------------------------------------------------- * Put an alignment marker. * @param frame * @param width * @param ox,oy center coordinate of the pattern */

(array &$frame, $ox, $oy)

Source from the content-addressed store, hash-verified

278 * @param ox,oy center coordinate of the pattern
279 */
280 public static function putAlignmentMarker(array &$frame, $ox, $oy)
281 {
282 $finder = array(
283 "\xa1\xa1\xa1\xa1\xa1",
284 "\xa1\xa0\xa0\xa0\xa1",
285 "\xa1\xa0\xa1\xa0\xa1",
286 "\xa1\xa0\xa0\xa0\xa1",
287 "\xa1\xa1\xa1\xa1\xa1"
288 );
289
290 $yStart = $oy-2;
291 $xStart = $ox-2;
292
293 for($y=0; $y<5; $y++) {
294 QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]);
295 }
296 }
297
298 //----------------------------------------------------------------------
299 public static function putAlignmentPattern($version, &$frame, $width)

Callers 1

putAlignmentPatternMethod · 0.95

Calls 1

setMethod · 0.45

Tested by

no test coverage detected