Skip to content

Commit 585c328

Browse files
committed
:octocat: +transparency documentation #121
1 parent b6777fd commit 585c328

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

src/QROptionsTrait.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,28 @@ trait QROptionsTrait{
219219
protected bool $imageBase64 = true;
220220

221221
/**
222-
* toggle transparency, not supported by jpg
223-
*/
222+
* toggle background transparency
223+
*
224+
* - In GdImage mode (png, gif) it sets imagecolortransparent() with QROptions::$imageTransparencyBG.
225+
* It also sets the "normal" background color without transparency switch.
226+
*
227+
* - In SVG mode (as of v5), it won't render the "light" modules,
228+
* as opacity/transparency can easily be set with css properties.
229+
*
230+
* - It has no effect in the FPDF and Imagick output modules.
231+
*
232+
* @see \chillerlan\QRCode\QROptions::$imageTransparencyBG
233+
* @see https://github.com/chillerlan/php-qrcode/discussions/121
234+
*/
224235
protected bool $imageTransparent = true;
225236

226237
/**
238+
* Sets the background color in GD mode.
239+
*
240+
* When QROptions::$imageTransparent is set to true, this color is set as transparent in imagecolortransparent()
241+
*
242+
* @see \chillerlan\QRCode\Output\QRGdImage
243+
* @see \chillerlan\QRCode\QROptions::$imageTransparent
227244
* @see imagecolortransparent()
228245
*
229246
* [R, G, B]

0 commit comments

Comments
 (0)