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

Method generateMaskNo

text-to-qr/lib/phpqrcode/phpqrcode.php:2570–2587  ·  view source on GitHub ↗

----------------------------------------------------------------------

($maskNo, $width, $frame)

Source from the content-addressed store, hash-verified

2568
2569 //----------------------------------------------------------------------
2570 private function generateMaskNo($maskNo, $width, $frame)
2571 {
2572 $bitMask = array_fill(0, $width, array_fill(0, $width, 0));
2573
2574 for($y=0; $y<$width; $y++) {
2575 for($x=0; $x<$width; $x++) {
2576 if(ord($frame[$y][$x]) & 0x80) {
2577 $bitMask[$y][$x] = 0;
2578 } else {
2579 $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y);
2580 $bitMask[$y][$x] = ($maskFunc == 0)?1:0;
2581 }
2582
2583 }
2584 }
2585
2586 return $bitMask;
2587 }
2588
2589 //----------------------------------------------------------------------
2590 public static function serial($bitFrame)

Callers 1

makeMaskNoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected