mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-14 19:56:33 +00:00
:octocat: allow reflectance reversal via QROptions::$invertMatrix
This commit is contained in:
@@ -61,6 +61,10 @@ abstract class QROutputAbstract implements QROutputInterface{
|
||||
$this->options = $options;
|
||||
$this->matrix = $matrix;
|
||||
|
||||
if($this->options->invertMatrix){
|
||||
$this->matrix->invert();
|
||||
}
|
||||
|
||||
$this->setMatrixDimensions();
|
||||
$this->setModuleValues();
|
||||
}
|
||||
|
||||
@@ -157,10 +157,13 @@ trait QROptionsTrait{
|
||||
*/
|
||||
protected $bgColor = null;
|
||||
|
||||
/**
|
||||
* Whether to invert the matrix (reflectance reversal)
|
||||
*/
|
||||
protected bool $invertMatrix = false;
|
||||
|
||||
/**
|
||||
* Whether to draw the light (false) modules
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected bool $drawLightModules = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user