@@ -63,8 +63,8 @@ |
||
| 63 | 63 | foreach($row as $c => $pixel){ |
| 64 | 64 | if($pixel){ |
| 65 | 65 | imagefilledrectangle($image, |
| 66 | - $this->options->marginSize + $c * $this->options->pixelSize, |
|
| 67 | - $this->options->marginSize + $r * $this->options->pixelSize, |
|
| 66 | + $this->options->marginSize + $c * $this->options->pixelSize, |
|
| 67 | + $this->options->marginSize + $r * $this->options->pixelSize, |
|
| 68 | 68 | $this->options->marginSize + ($c + 1) * $this->options->pixelSize - 1, |
| 69 | 69 | $this->options->marginSize + ($r + 1) * $this->options->pixelSize - 1, |
| 70 | 70 | $foreground); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->options = new $this->optionsInterface; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - if(is_array($this->types) && !in_array($this->options->type, $this->types , true)){ |
|
| 56 | + if(is_array($this->types) && !in_array($this->options->type, $this->types, true)){ |
|
| 57 | 57 | throw new QRCodeOutputException('Invalid output type!'); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | // svg header |
| 84 | 84 | $svg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'.$length.'" height="'.$length.'" viewBox="0 0 '.$length.' '.$length.'" style="background-color:'.$this->options->bgColor.'">'.$this->options->eol. |
| 85 | - '<defs><style>.'.$class.'{fill:'.$this->options->fgColor.'} rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
| 85 | + '<defs><style>.'.$class.'{fill:'.$this->options->fgColor.'} rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol; |
|
| 86 | 86 | |
| 87 | 87 | // svg body |
| 88 | 88 | foreach($this->matrix as $r => $row){ |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | elseif($from >= 0){ |
| 102 | 102 | $svg .= '<rect x="'.($from * $this->options->pixelSize + $this->options->marginSize).'" y="'.($r * $this->options->pixelSize + $this->options->marginSize) |
| 103 | - .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol; |
|
| 103 | + .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol; |
|
| 104 | 104 | |
| 105 | 105 | // reset count |
| 106 | 106 | $from = -1; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // close off the row, if applicable |
| 112 | 112 | if($from >= 0){ |
| 113 | 113 | $svg .= '<rect x="'.($from * $this->options->pixelSize + $this->options->marginSize).'" y="'.($r * $this->options->pixelSize + $this->options->marginSize) |
| 114 | - .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol; |
|
| 114 | + .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol; |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |