Quellcode durchsuchen

:octocat: +transparency documentation https://github.com/chillerlan/php-qrcode/discussions/121

smiley vor 3 Jahren
Ursprung
Commit
585c328d9e
1 geänderte Dateien mit 19 neuen und 2 gelöschten Zeilen
  1. 19 2
      src/QROptionsTrait.php

+ 19 - 2
src/QROptionsTrait.php

@@ -219,11 +219,28 @@ trait QROptionsTrait{
 	protected bool $imageBase64 = true;
 	protected bool $imageBase64 = true;
 
 
 	/**
 	/**
-	 * toggle transparency, not supported by jpg
-	 */
+	 * toggle background transparency
+	 *
+	 * - In GdImage mode (png, gif) it sets imagecolortransparent() with QROptions::$imageTransparencyBG.
+	 *   It also sets the "normal" background color without transparency switch.
+	 *
+	 * - In SVG mode (as of v5), it won't render the "light" modules,
+	 *   as opacity/transparency can easily be set with css properties.
+	 *
+	 * - It has no effect in the FPDF and Imagick output modules.
+	 *
+	 * @see \chillerlan\QRCode\QROptions::$imageTransparencyBG
+	 * @see https://github.com/chillerlan/php-qrcode/discussions/121
+ 	 */
 	protected bool $imageTransparent = true;
 	protected bool $imageTransparent = true;
 
 
 	/**
 	/**
+	 * Sets the background color in GD mode.
+	 *
+	 * When QROptions::$imageTransparent is set to true, this color is set as transparent in imagecolortransparent()
+	 *
+	 * @see \chillerlan\QRCode\Output\QRGdImage
+	 * @see \chillerlan\QRCode\QROptions::$imageTransparent
 	 * @see imagecolortransparent()
 	 * @see imagecolortransparent()
 	 *
 	 *
 	 * [R, G, B]
 	 * [R, G, B]