mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-16 08:45:45 +00:00
:octocat: added QRMatrix::M* constants for dark values, removed M_TEST
This commit is contained in:
@@ -17,30 +17,30 @@ try{
|
||||
|
||||
$moduleValues = [
|
||||
// finder
|
||||
(QRMatrix::M_FINDER << 8) => $_POST['m_finder_dark'],
|
||||
(QRMatrix::M_FINDER_DOT << 8) => $_POST['m_finder_dark'],
|
||||
QRMatrix::M_FINDER => $_POST['m_finder_light'],
|
||||
QRMatrix::M_FINDER_DARK => $_POST['m_finder_dark'],
|
||||
QRMatrix::M_FINDER_DOT => $_POST['m_finder_dark'],
|
||||
QRMatrix::M_FINDER => $_POST['m_finder_light'],
|
||||
// alignment
|
||||
(QRMatrix::M_ALIGNMENT << 8) => $_POST['m_alignment_dark'],
|
||||
QRMatrix::M_ALIGNMENT => $_POST['m_alignment_light'],
|
||||
QRMatrix::M_ALIGNMENT_DARK => $_POST['m_alignment_dark'],
|
||||
QRMatrix::M_ALIGNMENT => $_POST['m_alignment_light'],
|
||||
// timing
|
||||
(QRMatrix::M_TIMING << 8) => $_POST['m_timing_dark'],
|
||||
QRMatrix::M_TIMING => $_POST['m_timing_light'],
|
||||
QRMatrix::M_TIMING_DARK => $_POST['m_timing_dark'],
|
||||
QRMatrix::M_TIMING => $_POST['m_timing_light'],
|
||||
// format
|
||||
(QRMatrix::M_FORMAT << 8) => $_POST['m_format_dark'],
|
||||
QRMatrix::M_FORMAT => $_POST['m_format_light'],
|
||||
QRMatrix::M_FORMAT_DARK => $_POST['m_format_dark'],
|
||||
QRMatrix::M_FORMAT => $_POST['m_format_light'],
|
||||
// version
|
||||
(QRMatrix::M_VERSION << 8) => $_POST['m_version_dark'],
|
||||
QRMatrix::M_VERSION => $_POST['m_version_light'],
|
||||
QRMatrix::M_VERSION_DARK => $_POST['m_version_dark'],
|
||||
QRMatrix::M_VERSION => $_POST['m_version_light'],
|
||||
// data
|
||||
(QRMatrix::M_DATA << 8) => $_POST['m_data_dark'],
|
||||
QRMatrix::M_DATA => $_POST['m_data_light'],
|
||||
QRMatrix::M_DATA_DARK => $_POST['m_data_dark'],
|
||||
QRMatrix::M_DATA => $_POST['m_data_light'],
|
||||
// darkmodule
|
||||
(QRMatrix::M_DARKMODULE << 8) => $_POST['m_darkmodule_dark'],
|
||||
QRMatrix::M_DARKMODULE => $_POST['m_darkmodule_dark'],
|
||||
// separator
|
||||
QRMatrix::M_SEPARATOR => $_POST['m_separator_light'],
|
||||
QRMatrix::M_SEPARATOR => $_POST['m_separator_light'],
|
||||
// quietzone
|
||||
QRMatrix::M_QUIETZONE => $_POST['m_quietzone_light'],
|
||||
QRMatrix::M_QUIETZONE => $_POST['m_quietzone_light'],
|
||||
];
|
||||
|
||||
$moduleValues = array_map(function($v){
|
||||
|
||||
Reference in New Issue
Block a user