@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | // svg header |
| 69 | 69 | $svg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'.$length.'" height="'.$length.'" viewBox="0 0 '.$length.' '.$length.'">'.$this->options->eol. |
| 70 | - '<defs><style>rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
| 70 | + '<defs><style>rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
| 71 | 71 | |
| 72 | 72 | // @todo: optimize -> see https://github.com/alexeyten/qr-image/blob/master/lib/vector.js |
| 73 | 73 | foreach($this->options->moduleValues as $key => $value){ |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | elseif($from >= 0){ |
| 90 | 90 | $svg .= '<rect x="'.($from * $this->options->scale).'" y="'.($y * $this->options->scale) |
| 91 | - .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'"/>'.$this->options->eol; |
|
| 91 | + .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'"/>'.$this->options->eol; |
|
| 92 | 92 | |
| 93 | 93 | // reset count |
| 94 | 94 | $from = -1; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // close off the row, if applicable |
| 100 | 100 | if($from >= 0){ |
| 101 | 101 | $svg .= '<rect x="'.($from * $this->options->scale).'" y="'.($y * $this->options->scale) |
| 102 | - .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'" />'.$this->options->eol; |
|
| 102 | + .'" width="'.($this->options->scale * $count).'" height="'.$this->options->scale.'" class="'.$this->options->cssClass.'" fill="'.$value.'" />'.$this->options->eol; |
|
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | if($x <= $this->moduleCount - 7){ |
| 166 | 166 | if( |
| 167 | - $this->matrix->check($x , $y) |
|
| 167 | + $this->matrix->check($x , $y) |
|
| 168 | 168 | && !$this->matrix->check($x + 1, $y) |
| 169 | 169 | && $this->matrix->check($x + 2, $y) |
| 170 | 170 | && $this->matrix->check($x + 3, $y) |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | if($y <= $this->moduleCount - 7){ |
| 180 | 180 | if( |
| 181 | - $this->matrix->check($x, $y) |
|
| 181 | + $this->matrix->check($x, $y) |
|
| 182 | 182 | && !$this->matrix->check($x, $y + 1) |
| 183 | 183 | && $this->matrix->check($x, $y + 2) |
| 184 | 184 | && $this->matrix->check($x, $y + 3) |