diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-06-21 14:13:41 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-06-21 14:13:41 -0700 |
commit | a491348d442ab8e6cd2fa403d4365cdad78e52ce (patch) | |
tree | a00f575d82afb2c9051bad95398b4250f4a3d44d /vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php | |
parent | c73ac5f1f818b6b21083f6785b4b2f6d778a6496 (diff) |
Vendoring deprecated composer libs
Diffstat (limited to 'vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php')
-rw-r--r-- | vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php b/vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php deleted file mode 100644 index 02e94e3f..00000000 --- a/vendor/aferrandini/phpqrcode/lib/PHPQRCode/FrameFiller.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * FrameFiller.php - * - * Created by arielferrandini - */ - -namespace PHPQRCode; - -class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - -} ;
\ No newline at end of file |