diff --git a/Appendix/Contribute.html b/Appendix/Contribute.html index 310072f27..caa6a8e95 100644 --- a/Appendix/Contribute.html +++ b/Appendix/Contribute.html @@ -1,13 +1,15 @@ - + - + How to contribute — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Appendix/License.html b/Appendix/License.html index ec60e7f18..b44932904 100644 --- a/Appendix/License.html +++ b/Appendix/License.html @@ -1,13 +1,15 @@ - + - + License — PHP-QRCode main Manual - - + + + + @@ -108,7 +110,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -147,11 +148,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Appendix/Performance-considerations.html b/Appendix/Performance-considerations.html index 0fdcf608f..23ec4ebea 100644 --- a/Appendix/Performance-considerations.html +++ b/Appendix/Performance-considerations.html @@ -1,13 +1,15 @@ - + - + Performance considerations — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Appendix/Terminology.html b/Appendix/Terminology.html index 28ea2009a..75480856e 100644 --- a/Appendix/Terminology.html +++ b/Appendix/Terminology.html @@ -1,13 +1,15 @@ - + - + Terminology — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Appendix/URI-Content.html b/Appendix/URI-Content.html index 1d200ae0b..1db862f19 100644 --- a/Appendix/URI-Content.html +++ b/Appendix/URI-Content.html @@ -1,13 +1,15 @@ - + - + Popular content and URI schemes — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Built-In-Output/QREps.html b/Built-In-Output/QREps.html index c614377d7..ad4c8f743 100644 --- a/Built-In-Output/QREps.html +++ b/Built-In-Output/QREps.html @@ -1,13 +1,15 @@ - + - + QREps — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -372,7 +368,7 @@

    Set the options:

    $options = new QROptions;
     
    -$options->outputType       = QROutputInterface::EPS;
    +$options->outputInterface  = QREps::class;
     $options->scale            = 5;
     $options->drawLightModules = false;
     // colors can be specified either as [R, G, B] or [C, M, Y, K] (0-255)
    diff --git a/Built-In-Output/QRFpdf.html b/Built-In-Output/QRFpdf.html
    index ec4f81996..f9f9d136f 100644
    --- a/Built-In-Output/QRFpdf.html
    +++ b/Built-In-Output/QRFpdf.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRFpdf — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -372,7 +368,7 @@

    Set the options:

    $options = new QROptions;
     
    -$options->outputType       = QROutputInterface::FPDF;
    +$options->outputInterface  = QRFpdf::class;
     $options->scale            = 5;
     $options->fpdfMeasureUnit  = 'mm'; // pt, mm, cm, in
     $options->bgColor          = [222, 222, 222]; // [R, G, B]
    diff --git a/Built-In-Output/QRGdImage.html b/Built-In-Output/QRGdImage.html
    index 1cba90ada..d2370609f 100644
    --- a/Built-In-Output/QRGdImage.html
    +++ b/Built-In-Output/QRGdImage.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRGdImage — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -372,8 +368,8 @@

    Set the options:

    $options = new QROptions;
     
    -// $outputType can be one of: GDIMAGE_BMP, GDIMAGE_GIF, GDIMAGE_JPG, GDIMAGE_PNG, GDIMAGE_WEBP
    -$options->outputType          = QROutputInterface::GDIMAGE_WEBP;
    +// $outputInterface can be one of the classes listed in `QROutputInterface::MODES`
    +$options->outputInterface     = QRGdImageWEBP::class;
     $options->quality             = 90;
     // the size of one qr module in pixels
     $options->scale               = 20;
    diff --git a/Built-In-Output/QRImagick.html b/Built-In-Output/QRImagick.html
    index c8ef65e87..4f4b644eb 100644
    --- a/Built-In-Output/QRImagick.html
    +++ b/Built-In-Output/QRImagick.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRImagick — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -378,7 +374,7 @@

    Set the options:

    $options = new QROptions;
     
    -$options->outputType          = QROutputInterface::IMAGICK;
    +$options->outputInterface     = QRImagick::class;
     $options->imagickFormat       = 'webp'; // e.g. png32, jpeg, webp
     $options->quality             = 90;
     $options->scale               = 20;
    diff --git a/Built-In-Output/QRMarkupHTML.html b/Built-In-Output/QRMarkupHTML.html
    index ac6f589d7..77541d70d 100644
    --- a/Built-In-Output/QRMarkupHTML.html
    +++ b/Built-In-Output/QRMarkupHTML.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRMarkupHTML — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -374,9 +370,9 @@ As a general rule: if you plan to display the QR Code in a web browser, you shou

    Set the options:

    $options = new QROptions;
     
    -$options->outputType   = QROutputInterface::MARKUP_HTML;
    -$options->cssClass     = 'qrcode';
    -$options->moduleValues = [
    +$options->outputInterface = QRMarkupHTML::class;
    +$options->cssClass        = 'qrcode';
    +$options->moduleValues    = [
     	// finder
     	QRMatrix::M_FINDER_DARK    => '#A71111', // dark (true)
     	QRMatrix::M_FINDER_DOT     => '#A71111', // finder dot, dark (true)
    diff --git a/Built-In-Output/QRMarkupSVG.html b/Built-In-Output/QRMarkupSVG.html
    index b8f9c4033..b60a18705 100644
    --- a/Built-In-Output/QRMarkupSVG.html
    +++ b/Built-In-Output/QRMarkupSVG.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRMarkupSVG — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -373,7 +369,7 @@
    $options = new QROptions;
     
     $options->version              = 7;
    -$options->outputType           = QROutputInterface::MARKUP_SVG;
    +$options->outputInterface      = QRMarkupSVG::class;
     // if set to false, the light modules won't be rendered
     $options->drawLightModules     = true;
     $options->svgUseFillAttributes = true;
    diff --git a/Built-In-Output/QRString.html b/Built-In-Output/QRString.html
    index 45c84495a..448f1341d 100644
    --- a/Built-In-Output/QRString.html
    +++ b/Built-In-Output/QRString.html
    @@ -1,13 +1,15 @@
     
    -
    +
     
    -  
    +  
     
       
       QRString — PHP-QRCode main
      Manual
    -      
    -      
    +      
    +      
    +
    +  
       
    @@ -109,7 +111,6 @@
     
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -379,21 +375,21 @@ $options = new QROptions; -$options->outputType = QROutputInterface::STRING_TEXT; -$options->eol = "\n"; +$options->outputInterface = QRStringText::class; +$options->eol = "\n"; // add some space on the line start -$options->textLineStart = str_repeat(' ', 6); +$options->textLineStart = str_repeat(' ', 6); // default values for unassigned module types -$options->textDark = QRString::ansi8('██', 253); -$options->textLight = QRString::ansi8('░░', 253); -$options->moduleValues = [ - QRMatrix::M_FINDER_DARK => QRString::ansi8('██', 124), - QRMatrix::M_FINDER => QRString::ansi8('░░', 124), - QRMatrix::M_FINDER_DOT => QRString::ansi8('██', 124), - QRMatrix::M_ALIGNMENT_DARK => QRString::ansi8('██', 2), - QRMatrix::M_ALIGNMENT => QRString::ansi8('░░', 2), - QRMatrix::M_VERSION_DARK => QRString::ansi8('██', 21), - QRMatrix::M_VERSION => QRString::ansi8('░░', 21), +$options->textDark = QRStringText::ansi8('██', 253); +$options->textLight = QRStringText::ansi8('░░', 253); +$options->moduleValues = [ + QRMatrix::M_FINDER_DARK => QRStringText::ansi8('██', 124), + QRMatrix::M_FINDER => QRStringText::ansi8('░░', 124), + QRMatrix::M_FINDER_DOT => QRStringText::ansi8('██', 124), + QRMatrix::M_ALIGNMENT_DARK => QRStringText::ansi8('██', 2), + QRMatrix::M_ALIGNMENT => QRStringText::ansi8('░░', 2), + QRMatrix::M_VERSION_DARK => QRStringText::ansi8('██', 21), + QRMatrix::M_VERSION => QRStringText::ansi8('░░', 21), ];
    diff --git a/Customizing/Custom-output-interface.html b/Customizing/Custom-output-interface.html index e3aad8d4d..ecba78530 100644 --- a/Customizing/Custom-output-interface.html +++ b/Customizing/Custom-output-interface.html @@ -1,13 +1,15 @@ - + - + Custom QROutputInterface — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Customizing/Module-Values.html b/Customizing/Module-Values.html index 729ce0ee8..bfd69c9cd 100644 --- a/Customizing/Module-Values.html +++ b/Customizing/Module-Values.html @@ -1,13 +1,15 @@ - + - + Module values — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Customizing/QROutputAbstract.html b/Customizing/QROutputAbstract.html index 1670c70f8..c7a954595 100644 --- a/Customizing/QROutputAbstract.html +++ b/Customizing/QROutputAbstract.html @@ -1,13 +1,15 @@ - + - + QROutputAbstract — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Usage/Advanced-usage.html b/Usage/Advanced-usage.html index 065530bfc..92c0466aa 100644 --- a/Usage/Advanced-usage.html +++ b/Usage/Advanced-usage.html @@ -1,13 +1,15 @@ - + - + Advanced usage — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Usage/Configuration-settings.html b/Usage/Configuration-settings.html index 72c88a1ca..fcdb3d356 100644 --- a/Usage/Configuration-settings.html +++ b/Usage/Configuration-settings.html @@ -1,13 +1,15 @@ - + - + Configuration settings — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -388,13 +384,14 @@

    eccLevel

    Error correct level

    -

    EccLevel::X where X is:

    +

    the constant EccLevel::X where X is:

    • L => 7% (default)

    • M => 15%

    • Q => 25%

    • H => 30%

    +

    alternatively you can just pass the letters L/M/Q/H (case-insensitive) to the magic setter

    See also:

    • \chillerlan\QRCode\Common\EccLevel

    • @@ -423,43 +420,9 @@

      Size of the quiet zone

      internally clamped to 0 ... $moduleCount / 2 (default: 4)

    -
    -

    outputType

    -

    The built-in output type

    -
      -
    • QROutputInterface::MARKUP_SVG (default)

    • -
    • QROutputInterface::MARKUP_HTML

    • -
    • QROutputInterface::GDIMAGE_BMP

    • -
    • QROutputInterface::GDIMAGE_GIF

    • -
    • QROutputInterface::GDIMAGE_JPG

    • -
    • QROutputInterface::GDIMAGE_PNG

    • -
    • QROutputInterface::GDIMAGE_WEBP

    • -
    • QROutputInterface::STRING_TEXT

    • -
    • QROutputInterface::STRING_JSON

    • -
    • QROutputInterface::IMAGICK

    • -
    • QROutputInterface::EPS

    • -
    • QROutputInterface::FPDF

    • -
    • QROutputInterface::CUSTOM

    • -
    -

    Deprecated: 5.0.0 see issue #223

    -

    See also:

    -
      -
    • \chillerlan\QRCode\Output\QREps

    • -
    • \chillerlan\QRCode\Output\QRFpdf

    • -
    • \chillerlan\QRCode\Output\QRGdImage

    • -
    • \chillerlan\QRCode\Output\QRImagick

    • -
    • \chillerlan\QRCode\Output\QRMarkupHTML

    • -
    • \chillerlan\QRCode\Output\QRMarkupSVG

    • -
    • \chillerlan\QRCode\Output\QRString

    • -
    • github.com/chillerlan/php-qrcode/issues/223

    • -
    -

    outputInterface

    -

    The FQCN of the custom QROutputInterface

    -

    if QROptions::$outputType is set to QROutputInterface::CUSTOM (default: null)

    -

    Deprecated: 5.0.0 the nullable type will be removed in future versions -and the default value will be set to QRMarkupSVG::class

    +

    The FQCN of the QROutputInterface to use

    returnResource

    @@ -551,14 +514,24 @@ using imagefilledel

    connectPaths

    Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc.

    +

    This option is exclusive to output classes that use the module collector QROutputAbstract::collectModules(), +which converts the $M_TYPE of all modules to QRMatrix::M_DATA and QRMatrix::M_DATA_DARK respectively.

    +

    Module types that should not be added to the connected path can be excluded via QROptions::$excludeFromConnect.

    +

    Currentty used in QREps and QRMarkupSVG.

    See also:

    excludeFromConnect

    Specify which paths/patterns to exclude from connecting if QROptions::$connectPaths is set to true

    +

    See also:

    +
      +
    • \chillerlan\QRCode\QROptionsTrait::$connectPaths

    • +

    moduleValues

    @@ -744,46 +717,6 @@ When set to falseIncrease the contrast before reading

    note that applying contrast works different in GD and Imagick, so mileage may vary

    -
    -

    imageBase64

    -

    Deprecated: 5.0.0 use QROptions::$outputBase64 instead

    -

    See also:

    -
      -
    •        \chillerlan\QRCode\QROptions::$outputBase64

    • -
    -
    -
    -

    jpegQuality

    -

    Deprecated: 5.0.0 use QROptions::$quality instead

    -

    See also:

    -
      -
    •        \chillerlan\QRCode\QROptions::$quality

    • -
    -
    -
    -

    pngCompression

    -

    Deprecated: 5.0.0 use QROptions::$quality instead

    -

    See also:

    -
      -
    •        \chillerlan\QRCode\QROptions::$quality

    • -
    -
    -
    -

    imageTransparencyBG

    -

    Deprecated: 5.0.0 use QROptions::$transparencyColor instead

    -

    See also:

    -
      -
    •        \chillerlan\QRCode\QROptions::$transparencyColor

    • -
    -
    -
    -

    imagickBG

    -

    Deprecated: 5.0.0 use QROptions::$bgColor instead

    -

    See also:

    -
      -
    •        \chillerlan\QRCode\QROptions::$bgColor

    • -
    -
    diff --git a/Usage/Installation.html b/Usage/Installation.html index 82f09bd37..7fdb64c4d 100644 --- a/Usage/Installation.html +++ b/Usage/Installation.html @@ -1,13 +1,15 @@ - + - + Installation — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/Usage/Overview.html b/Usage/Overview.html index 219c01018..f5b39bdd6 100644 --- a/Usage/Overview.html +++ b/Usage/Overview.html @@ -1,13 +1,15 @@ - + - + Overview — PHP-QRCode main Manual - - + + + + @@ -109,7 +111,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -148,11 +149,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -376,7 +372,11 @@ It also features a QR Code reader based on a
  • numeric

  • alphanumeric

  • -
  • 8-bit binary

  • +
  • 8-bit binary

    +
    +
  • 13-bit double-byte:

    diff --git a/_sources/Built-In-Output/QREps.md.txt b/_sources/Built-In-Output/QREps.md.txt index 9cef1814f..730588000 100644 --- a/_sources/Built-In-Output/QREps.md.txt +++ b/_sources/Built-In-Output/QREps.md.txt @@ -12,7 +12,7 @@ Set the options: ```php $options = new QROptions; -$options->outputType = QROutputInterface::EPS; +$options->outputInterface = QREps::class; $options->scale = 5; $options->drawLightModules = false; // colors can be specified either as [R, G, B] or [C, M, Y, K] (0-255) diff --git a/_sources/Built-In-Output/QRFpdf.md.txt b/_sources/Built-In-Output/QRFpdf.md.txt index db35e9ec1..3bda31410 100644 --- a/_sources/Built-In-Output/QRFpdf.md.txt +++ b/_sources/Built-In-Output/QRFpdf.md.txt @@ -12,7 +12,7 @@ Set the options: ```php $options = new QROptions; -$options->outputType = QROutputInterface::FPDF; +$options->outputInterface = QRFpdf::class; $options->scale = 5; $options->fpdfMeasureUnit = 'mm'; // pt, mm, cm, in $options->bgColor = [222, 222, 222]; // [R, G, B] diff --git a/_sources/Built-In-Output/QRGdImage.md.txt b/_sources/Built-In-Output/QRGdImage.md.txt index 09cc3f5ed..8fbfcb7ca 100644 --- a/_sources/Built-In-Output/QRGdImage.md.txt +++ b/_sources/Built-In-Output/QRGdImage.md.txt @@ -8,11 +8,12 @@ See: [GdImage example](https://github.com/chillerlan/php-qrcode/blob/main/examples/image.php) Set the options: + ```php $options = new QROptions; -// $outputType can be one of: GDIMAGE_BMP, GDIMAGE_GIF, GDIMAGE_JPG, GDIMAGE_PNG, GDIMAGE_WEBP -$options->outputType = QROutputInterface::GDIMAGE_WEBP; +// $outputInterface can be one of the classes listed in `QROutputInterface::MODES` +$options->outputInterface = QRGdImageWEBP::class; $options->quality = 90; // the size of one qr module in pixels $options->scale = 20; diff --git a/_sources/Built-In-Output/QRImagick.md.txt b/_sources/Built-In-Output/QRImagick.md.txt index d0e0e7993..b1068ab63 100644 --- a/_sources/Built-In-Output/QRImagick.md.txt +++ b/_sources/Built-In-Output/QRImagick.md.txt @@ -14,10 +14,11 @@ Please follow the installation guides for your operating system: See: [ImageMagick example](https://github.com/chillerlan/php-qrcode/blob/main/examples/imagick.php) Set the options: + ```php $options = new QROptions; -$options->outputType = QROutputInterface::IMAGICK; +$options->outputInterface = QRImagick::class; $options->imagickFormat = 'webp'; // e.g. png32, jpeg, webp $options->quality = 90; $options->scale = 20; diff --git a/_sources/Built-In-Output/QRMarkupHTML.md.txt b/_sources/Built-In-Output/QRMarkupHTML.md.txt index 9fdedab5e..e6fb9c454 100644 --- a/_sources/Built-In-Output/QRMarkupHTML.md.txt +++ b/_sources/Built-In-Output/QRMarkupHTML.md.txt @@ -15,9 +15,9 @@ Set the options: ```php $options = new QROptions; -$options->outputType = QROutputInterface::MARKUP_HTML; -$options->cssClass = 'qrcode'; -$options->moduleValues = [ +$options->outputInterface = QRMarkupHTML::class; +$options->cssClass = 'qrcode'; +$options->moduleValues = [ // finder QRMatrix::M_FINDER_DARK => '#A71111', // dark (true) QRMatrix::M_FINDER_DOT => '#A71111', // finder dot, dark (true) diff --git a/_sources/Built-In-Output/QRMarkupSVG.md.txt b/_sources/Built-In-Output/QRMarkupSVG.md.txt index e81cea11b..298c8f631 100644 --- a/_sources/Built-In-Output/QRMarkupSVG.md.txt +++ b/_sources/Built-In-Output/QRMarkupSVG.md.txt @@ -12,7 +12,7 @@ Set the options: $options = new QROptions; $options->version = 7; -$options->outputType = QROutputInterface::MARKUP_SVG; +$options->outputInterface = QRMarkupSVG::class; // if set to false, the light modules won't be rendered $options->drawLightModules = true; $options->svgUseFillAttributes = true; diff --git a/_sources/Built-In-Output/QRString.md.txt b/_sources/Built-In-Output/QRString.md.txt index ec84cece6..f28bea465 100644 --- a/_sources/Built-In-Output/QRString.md.txt +++ b/_sources/Built-In-Output/QRString.md.txt @@ -17,21 +17,21 @@ function ansi8(string $str, int $color, bool $background = false):string{ $options = new QROptions; -$options->outputType = QROutputInterface::STRING_TEXT; -$options->eol = "\n"; +$options->outputInterface = QRStringText::class; +$options->eol = "\n"; // add some space on the line start -$options->textLineStart = str_repeat(' ', 6); +$options->textLineStart = str_repeat(' ', 6); // default values for unassigned module types -$options->textDark = QRString::ansi8('██', 253); -$options->textLight = QRString::ansi8('░░', 253); -$options->moduleValues = [ - QRMatrix::M_FINDER_DARK => QRString::ansi8('██', 124), - QRMatrix::M_FINDER => QRString::ansi8('░░', 124), - QRMatrix::M_FINDER_DOT => QRString::ansi8('██', 124), - QRMatrix::M_ALIGNMENT_DARK => QRString::ansi8('██', 2), - QRMatrix::M_ALIGNMENT => QRString::ansi8('░░', 2), - QRMatrix::M_VERSION_DARK => QRString::ansi8('██', 21), - QRMatrix::M_VERSION => QRString::ansi8('░░', 21), +$options->textDark = QRStringText::ansi8('██', 253); +$options->textLight = QRStringText::ansi8('░░', 253); +$options->moduleValues = [ + QRMatrix::M_FINDER_DARK => QRStringText::ansi8('██', 124), + QRMatrix::M_FINDER => QRStringText::ansi8('░░', 124), + QRMatrix::M_FINDER_DOT => QRStringText::ansi8('██', 124), + QRMatrix::M_ALIGNMENT_DARK => QRStringText::ansi8('██', 2), + QRMatrix::M_ALIGNMENT => QRStringText::ansi8('░░', 2), + QRMatrix::M_VERSION_DARK => QRStringText::ansi8('██', 21), + QRMatrix::M_VERSION => QRStringText::ansi8('░░', 21), ]; ``` diff --git a/_sources/Usage/Configuration-settings.md.txt b/_sources/Usage/Configuration-settings.md.txt index c3ef5beaf..ad9799644 100644 --- a/_sources/Usage/Configuration-settings.md.txt +++ b/_sources/Usage/Configuration-settings.md.txt @@ -30,13 +30,15 @@ if `QROptions::$version` is set to `Version::AUTO` (default: 40) Error correct level -`EccLevel::X` where `X` is: +the constant `EccLevel::X` where `X` is: - `L` => 7% (default) - `M` => 15% - `Q` => 25% - `H` => 30% +alternatively you can just pass the letters L/M/Q/H (case-insensitive) to the magic setter + **See also:** @@ -73,47 +75,9 @@ Size of the quiet zone internally clamped to `0 ... $moduleCount / 2` (default: 4) -## outputType - -The built-in output type - -- `QROutputInterface::MARKUP_SVG` (default) -- `QROutputInterface::MARKUP_HTML` -- `QROutputInterface::GDIMAGE_BMP` -- `QROutputInterface::GDIMAGE_GIF` -- `QROutputInterface::GDIMAGE_JPG` -- `QROutputInterface::GDIMAGE_PNG` -- `QROutputInterface::GDIMAGE_WEBP` -- `QROutputInterface::STRING_TEXT` -- `QROutputInterface::STRING_JSON` -- `QROutputInterface::IMAGICK` -- `QROutputInterface::EPS` -- `QROutputInterface::FPDF` -- `QROutputInterface::CUSTOM` - - -**Deprecated:** 5.0.0 see issue #223 - -**See also:** - -- `\chillerlan\QRCode\Output\QREps` -- `\chillerlan\QRCode\Output\QRFpdf` -- `\chillerlan\QRCode\Output\QRGdImage` -- `\chillerlan\QRCode\Output\QRImagick` -- `\chillerlan\QRCode\Output\QRMarkupHTML` -- `\chillerlan\QRCode\Output\QRMarkupSVG` -- `\chillerlan\QRCode\Output\QRString` -- [github.com/chillerlan/php-qrcode/issues/223](https://github.com/chillerlan/php-qrcode/issues/223) - - ## outputInterface -The FQCN of the custom `QROutputInterface` - -if `QROptions::$outputType` is set to `QROutputInterface::CUSTOM` (default: `null`) - -**Deprecated:** 5.0.0 the nullable type will be removed in future versions -and the default value will be set to `QRMarkupSVG::class` +The FQCN of the `QROutputInterface` to use ## returnResource @@ -175,7 +139,6 @@ Sets the image background color (if applicable) - `QRFpdf`: defaults to blank internally (white page) - ## invertMatrix Whether to invert the matrix (reflectance reversal) @@ -232,9 +195,18 @@ Specifies which module types to exclude when `QROptions::$drawCircularModules` i Whether to connect the paths for the several module types to avoid weird glitches when using gradients etc. +This option is exclusive to output classes that use the module collector `QROutputAbstract::collectModules()`, +which converts the `$M_TYPE` of all modules to `QRMatrix::M_DATA` and `QRMatrix::M_DATA_DARK` respectively. + +Module types that should not be added to the connected path can be excluded via `QROptions::$excludeFromConnect`. + +Currentty used in `QREps` and `QRMarkupSVG`. + **See also:** +- `\chillerlan\QRCode\Output\QROutputAbstract::collectModules()` +- `\chillerlan\QRCode\QROptionsTrait::$excludeFromConnect` - [github.com/chillerlan/php-qrcode/issues/57](https://github.com/chillerlan/php-qrcode/issues/57) @@ -243,6 +215,11 @@ Whether to connect the paths for the several module types to avoid weird glitche Specify which paths/patterns to exclude from connecting if `QROptions::$connectPaths` is set to `true` +**See also:** + +- `\chillerlan\QRCode\QROptionsTrait::$connectPaths` + + ## moduleValues Module values map @@ -467,48 +444,3 @@ Increase the contrast before reading note that applying contrast works different in GD and Imagick, so mileage may vary - -## imageBase64 - -**Deprecated:** 5.0.0 use QROptions::$outputBase64 instead - -**See also:** - -- ` \chillerlan\QRCode\QROptions::$outputBase64` - - -## jpegQuality - -**Deprecated:** 5.0.0 use QROptions::$quality instead - -**See also:** - -- ` \chillerlan\QRCode\QROptions::$quality` - - -## pngCompression - -**Deprecated:** 5.0.0 use QROptions::$quality instead - -**See also:** - -- ` \chillerlan\QRCode\QROptions::$quality` - - -## imageTransparencyBG - -**Deprecated:** 5.0.0 use QROptions::$transparencyColor instead - -**See also:** - -- ` \chillerlan\QRCode\QROptions::$transparencyColor` - - -## imagickBG - -**Deprecated:** 5.0.0 use QROptions::$bgColor instead - -**See also:** - -- ` \chillerlan\QRCode\QROptions::$bgColor` - diff --git a/_sources/Usage/Overview.md.txt b/_sources/Usage/Overview.md.txt index a6ab1c00d..7315734a4 100644 --- a/_sources/Usage/Overview.md.txt +++ b/_sources/Usage/Overview.md.txt @@ -12,12 +12,13 @@ It also features a QR Code reader based on a [PHP port](https://github.com/khana - numeric - alphanumeric - 8-bit binary + - [ECI support](https://en.wikipedia.org/wiki/Extended_Channel_Interpretation) - 13-bit double-byte: - kanji (Japanese, Shift-JIS) - hanzi (simplified Chinese, GB2312/GB18030) as [defined in GBT18284-2000](https://www.chinesestandard.net/PDF/English.aspx/GBT18284-2000) - Flexible, easily extensible output modules, built-in support for the following output formats: - - [GdImage](https://www.php.net/manual/book.image) - - [ImageMagick](https://www.php.net/manual/book.imagick) + - [GdImage](https://www.php.net/manual/book.image) (raster graphics: avif, bmp, gif, jpeg, png, webp) + - [ImageMagick](https://www.php.net/manual/book.imagick) ([multiple supported image formats](https://imagemagick.org/script/formats.php)) - Markup types: SVG, HTML, etc. - String types: JSON, plain text, etc. - Encapsulated Postscript (EPS) diff --git a/genindex.html b/genindex.html index 94ae99876..9c6a10e1b 100644 --- a/genindex.html +++ b/genindex.html @@ -1,12 +1,14 @@ - + Index — PHP-QRCode main Manual - - + + + + @@ -106,7 +108,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -145,11 +146,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/index.html b/index.html index 686699c38..c8546c863 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,15 @@ - + - + PHP-QRCode Manual — PHP-QRCode main Manual - - + + + + @@ -108,7 +110,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -147,11 +148,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • @@ -364,7 +360,7 @@

    PHP-QRCode Manual

    -

    User manual for chillerlan/php-qrcode [main]. Updated on Nov 24, 2023.

    +

    User manual for chillerlan/php-qrcode [main]. Updated on Jan 07, 2024.

    The phpDocumentor API documentation can be found at chillerlan.github.io/php-qrcode.

    This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.

    @@ -431,7 +427,6 @@
  • maskPattern
  • addQuietzone
  • quietzoneSize
  • -
  • outputType
  • outputInterface
  • returnResource
  • cachefile
  • @@ -470,11 +465,6 @@
  • readerGrayscale
  • readerInvertColors
  • readerIncreaseContrast
  • -
  • imageBase64
  • -
  • jpegQuality
  • -
  • pngCompression
  • -
  • imageTransparencyBG
  • -
  • imagickBG
  • diff --git a/search.html b/search.html index 19eb9636e..8d721c1c1 100644 --- a/search.html +++ b/search.html @@ -1,12 +1,14 @@ - + Search — PHP-QRCode main Manual - - + + + +