@@ -232,32 +232,41 @@ trait QROptionsTrait{
232232 /**
233233 * toggle background transparency
234234 *
235- * - In GdImage mode (png, gif) it sets imagecolortransparent() with QROptions::$imageTransparencyBG.
236- * It also sets the "normal" background color without transparency switch.
235+ * - GdImage: (png, gif) it sets imagecolortransparent() with {@see \chillerlan\QRCode\QROptions::$imageTransparencyBG}
237236 *
238- * - In SVG mode (as of v5), it won't render the "light" modules,
239- * as opacity/transparency can easily be set with css properties.
240237 *
241- * - It has no effect in the FPDF and Imagick output modules.
242- *
243- * @see \chillerlan\QRCode\QROptions::$imageTransparencyBG
244238 * @see https://github.com/chillerlan/php-qrcode/discussions/121
245239 */
246240 protected bool $ imageTransparent = true ;
247241
248242 /**
249- * Sets the background color in GD mode.
243+ * whether to draw the light (false) modules
244+ *
245+ * @var bool
246+ */
247+ protected bool $ drawLightModules = true ;
248+
249+ /**
250+ * Sets the background color in GD mode: [R, G, B].
250251 *
251- * When QROptions:: $imageTransparent is set to true, this color is set as transparent in imagecolortransparent()
252+ * When $imageTransparent is set to true, this color is set as transparent in imagecolortransparent()
252253 *
253254 * @see \chillerlan\QRCode\Output\QRGdImage
254255 * @see \chillerlan\QRCode\QROptions::$imageTransparent
255256 * @see imagecolortransparent()
256- *
257- * [R, G, B]
258257 */
259258 protected array $ imageTransparencyBG = [255 , 255 , 255 ];
260259
260+ /**
261+ * Sets the image background color (if applicable)
262+ *
263+ * - Imagick: defaults to "transparent" or "white", depending on $imageTransparent, {@see \ImagickPixel::__construct()}
264+ * - GdImage: defaults to $imageTransparencyBG, {@see \chillerlan\QRCode\QROptions::$imageTransparencyBG}
265+ *
266+ * @var mixed|null
267+ */
268+ protected $ bgColor = null ;
269+
261270 /**
262271 * @see imagepng()
263272 */
@@ -277,8 +286,10 @@ trait QROptionsTrait{
277286 protected string $ imagickFormat = 'png32 ' ;
278287
279288 /**
280- * Imagick background color (defaults to "transparent")
289+ * Imagick background color
281290 *
291+ * @deprecated 5.0.0 use QROptions::$bgColor instead
292+ * @see \chillerlan\QRCode\QROptions::$bgColor
282293 * @see \ImagickPixel::__construct()
283294 */
284295 protected ?string $ imagickBG = null ;
0 commit comments