|
@@ -749,19 +749,27 @@ class QRMatrix{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for($count = 0; $count < $this->moduleCount; $count++){
|
|
for($count = 0; $count < $this->moduleCount; $count++){
|
|
|
- $y = ($direction) ? ($this->moduleCount - 1 - $count) : $count;
|
|
|
|
|
|
|
+ $y = $count;
|
|
|
|
|
+
|
|
|
|
|
+ if($direction){
|
|
|
|
|
+ $y = ($this->moduleCount - 1 - $count);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
for($col = 0; $col < 2; $col++){
|
|
for($col = 0; $col < 2; $col++){
|
|
|
$x = ($i - $col);
|
|
$x = ($i - $col);
|
|
|
|
|
|
|
|
// skip functional patterns
|
|
// skip functional patterns
|
|
|
- if($this->get($x, $y) !== $this::M_NULL){
|
|
|
|
|
|
|
+ if($this->matrix[$y][$x] !== $this::M_NULL){
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $v = $iByte < $byteCount && (($data[$iByte] >> $iBit--) & 1) === 1;
|
|
|
|
|
|
|
+ $value = 0;
|
|
|
|
|
+
|
|
|
|
|
+ if($iByte < $byteCount && (($data[$iByte] >> $iBit--) & 1) === 1){
|
|
|
|
|
+ $value = $this::IS_DARK;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- $this->set($x, $y, $v, $this::M_DATA);
|
|
|
|
|
|
|
+ $this->matrix[$y][$x] = ($this::M_DATA | $value);
|
|
|
|
|
|
|
|
if($iBit === -1){
|
|
if($iBit === -1){
|
|
|
$iByte++;
|
|
$iByte++;
|