MCPcopy Index your code
hub / github.com/codemistic/Web-Development / next

Method next

text-to-qr/lib/phpqrcode/qrencode.php:339–390  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

337
338 //----------------------------------------------------------------------
339 public function next()
340 {
341 do {
342
343 if($this->bit == -1) {
344 $this->bit = 0;
345 return array('x'=>$this->x, 'y'=>$this->y);
346 }
347
348 $x = $this->x;
349 $y = $this->y;
350 $w = $this->width;
351
352 if($this->bit == 0) {
353 $x--;
354 $this->bit++;
355 } else {
356 $x++;
357 $y += $this->dir;
358 $this->bit--;
359 }
360
361 if($this->dir < 0) {
362 if($y < 0) {
363 $y = 0;
364 $x -= 2;
365 $this->dir = 1;
366 if($x == 6) {
367 $x--;
368 $y = 9;
369 }
370 }
371 } else {
372 if($y == $w) {
373 $y = $w - 1;
374 $x -= 2;
375 $this->dir = -1;
376 if($x == 6) {
377 $x--;
378 $y -= 8;
379 }
380 }
381 }
382 if($x < 0 || $y < 0) return null;
383
384 $this->x = $x;
385 $this->y = $y;
386
387 } while(ord($this->frame[$y][$x]) & 0x80);
388
389 return array('x'=>$x, 'y'=>$y);
390 }
391
392 } ;
393

Callers 15

encodeMaskMethod · 0.45
jquery-ui.min.jsFile · 0.45
jquery-ui.min.jsFile · 0.45
bootstrap.min.jsFile · 0.45
tinymce.min.jsFile · 0.45
rFunction · 0.45
XFunction · 0.45
cFunction · 0.45
GFunction · 0.45
yFunction · 0.45
wFunction · 0.45
fFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected