mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-08 21:05:50 +00:00
:octocat: QRMatrix::M_*TYPE rework, separate masking
This commit is contained in:
+18
-16
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @filesource image.php
|
||||
* @filesource imagick.php
|
||||
* @created 24.12.2017
|
||||
* @author Smiley <smiley@chillerlan.net>
|
||||
* @copyright 2017 Smiley
|
||||
@@ -11,6 +11,7 @@
|
||||
namespace chillerlan\QRCodeExamples;
|
||||
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
use chillerlan\QRCode\Data\QRMatrix;
|
||||
use chillerlan\QRCode\Common\EccLevel;
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
@@ -24,29 +25,30 @@ $options = new QROptions([
|
||||
'scale' => 5,
|
||||
'moduleValues' => [
|
||||
// finder
|
||||
1536 => '#A71111', // dark (true)
|
||||
6 => '#FFBFBF', // light (false)
|
||||
QRMatrix::M_FINDER | QRMatrix::IS_DARK => '#A71111', // dark (true)
|
||||
QRMatrix::M_FINDER => '#FFBFBF', // light (false)
|
||||
QRMatrix::M_FINDER_DOT | QRMatrix::IS_DARK => '#A71111', // finder dot, dark (true)
|
||||
// alignment
|
||||
2560 => '#A70364',
|
||||
10 => '#FFC9C9',
|
||||
QRMatrix::M_ALIGNMENT | QRMatrix::IS_DARK => '#A70364',
|
||||
QRMatrix::M_ALIGNMENT => '#FFC9C9',
|
||||
// timing
|
||||
3072 => '#98005D',
|
||||
12 => '#FFB8E9',
|
||||
QRMatrix::M_TIMING | QRMatrix::IS_DARK => '#98005D',
|
||||
QRMatrix::M_TIMING => '#FFB8E9',
|
||||
// format
|
||||
3584 => '#003804',
|
||||
14 => '#00FB12',
|
||||
QRMatrix::M_FORMAT | QRMatrix::IS_DARK => '#003804',
|
||||
QRMatrix::M_FORMAT => '#00FB12',
|
||||
// version
|
||||
4096 => '#650098',
|
||||
16 => '#E0B8FF',
|
||||
QRMatrix::M_VERSION | QRMatrix::IS_DARK => '#650098',
|
||||
QRMatrix::M_VERSION => '#E0B8FF',
|
||||
// data
|
||||
1024 => '#4A6000',
|
||||
4 => '#ECF9BE',
|
||||
QRMatrix::M_DATA | QRMatrix::IS_DARK => '#4A6000',
|
||||
QRMatrix::M_DATA => '#ECF9BE',
|
||||
// darkmodule
|
||||
512 => '#080063',
|
||||
QRMatrix::M_DARKMODULE | QRMatrix::IS_DARK => '#080063',
|
||||
// separator
|
||||
8 => '#DDDDDD',
|
||||
QRMatrix::M_SEPARATOR => '#DDDDDD',
|
||||
// quietzone
|
||||
18 => '#DDDDDD',
|
||||
QRMatrix::M_QUIETZONE => '#DDDDDD',
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user