Skip to content

Commit

Permalink
🚿
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Sep 18, 2023
1 parent 25918aa commit 3869f66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 6 additions & 4 deletions examples/svgMeltedModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ protected function darkModule(Closure $check, bool $invert):string{
case !$invert && $check(0b00001010, 0b01010101): // 7
case $invert && $check(0b00000000, 0b00011111):
return 'M%1$s,%2$s v%4$s q0,%3$s %3$s,%3$s h%4$s v-1Z';
default:
// full square
return 'M%1$s,%2$s h1 v1 h-1Z';
}

// full square
return 'M%1$s,%2$s h1 v1 h-1Z';
}

/**
Expand Down Expand Up @@ -204,10 +205,11 @@ protected function lightModule(Closure $check, bool $invert):string{
case !$invert && $check(0b11100000, 0b00011111): // 7
case $invert && $check(0b10100000, 0b01010101):
return 'M%1$s,%2$s m0,1 v-%3$s q0,%3$s %3$s,%3$sZ';
default:
// empty block
return '';
}

// empty block
return '';
}

}
Expand Down
6 changes: 1 addition & 5 deletions src/Output/QROutputAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,7 @@ protected function collectModules(Closure $transform):array{

if($this->options->connectPaths && !$this->matrix->checkTypeIn($x, $y, $this->options->excludeFromConnect)){
// to connect paths we'll redeclare the $M_TYPE_LAYER to data only
$M_TYPE_LAYER = QRMatrix::M_DATA;

if($this->matrix->check($x, $y)){
$M_TYPE_LAYER = QRMatrix::M_DATA_DARK;
}
$M_TYPE_LAYER = $this->matrix->check($x, $y) ? QRMatrix::M_DATA_DARK : QRMatrix::M_DATA;
}

// collect the modules per $M_TYPE
Expand Down

0 comments on commit 3869f66

Please sign in to comment.