:octocat: removed QROptionsTrait::$markupDark and QROptionsTrait::$markupLight, added QROptionsTrait::$svgUseFillAttributes

This commit is contained in:
smiley
2023-10-14 23:45:14 +02:00
parent 07eb6e38ff
commit dfb7728d37
10 changed files with 82 additions and 89 deletions
+19 -12
View File
@@ -19,6 +19,14 @@ require_once __DIR__.'/../vendor/autoload.php';
class QRImagickImageAsBackground extends QRImagick{
/**
* @inheritDoc
*/
protected function getDefaultModuleValue(bool $isDark):ImagickPixel{
// RGBA, adjust opacity to increase contrast
return $this->prepareModuleValue(($isDark) ? '#00000040' : '#ffffffa0');
}
/**
* @inheritDoc
*/
@@ -81,18 +89,17 @@ class ImageAsBackgroundOptions extends QROptions{
$options = new ImageAsBackgroundOptions;
$options->background = __DIR__.'/background.jpg'; // setting from the augmented options
$options->version = 5;
$options->outputType = QROutputInterface::CUSTOM;
$options->outputInterface = QRImagickImageAsBackground::class; // use the custom output class
$options->eccLevel = EccLevel::H;
$options->outputBase64 = false;
$options->scale = 10;
$options->drawLightModules = true;
$options->markupDark = '#00000040'; // RGBA, adjust opacity to increase contrast
$options->markupLight = '#ffffffa0';
$options->invertMatrix = false;
$options->quietzoneSize = 1;
$options->background = __DIR__.'/background.jpg'; // setting from the augmented options
$options->version = 5;
$options->outputType = QROutputInterface::CUSTOM;
$options->outputInterface = QRImagickImageAsBackground::class; // use the custom output class
$options->eccLevel = EccLevel::H;
$options->outputBase64 = false;
$options->scale = 10;
$options->drawLightModules = true;
$options->svgUseFillAttributes = false;
$options->invertMatrix = false;
$options->quietzoneSize = 1;
// dump the output, with an additional logo