EFStyleImageFillParams
public class EFStyleImageFillParams : EFStyleParams
Parameters for image fill QR code styling.
This class defines the styling parameters for image fill QR codes, which use images as background with QR code modules as masks. This creates QR codes where the image shows through the QR code pattern.
## Features
- Image background with QR code mask
- Customizable background and mask colors
- Icon and backdrop support
- Image transparency control
## Usage
let imageParams = EFStyleImageFillParamsImage(
image: myImage,
mode: .scaleAspectFill,
alpha: 1.0
)
let params = EFStyleImageFillParams(
icon: icon,
backdrop: backdrop,
image: imageParams,
backgroundColor: .white,
maskColor: .black
)
let style = EFQRCodeStyle.imageFill(params)
## Visual Characteristics
- Image appears as background
- QR code modules create mask over image
- Maintains QR code structure and scannability
- Creates visually appealing QR codes with image content
-
The default backdrop configuration for image fill QR codes.
Declaration
Swift
public static let defaultBackdrop: EFStyleParamBackdrop
-
The default background color (white).
Declaration
Swift
public static let defaultBackgroundColor: CGColor
-
The default mask color (semi-transparent black).
Declaration
Swift
public static let defaultMaskColor: CGColor
-
Creates image fill QR code styling parameters.
Declaration
Swift
public init( icon: EFStyleParamIcon? = nil, backdrop: EFStyleParamBackdrop = EFStyleImageFillParams.defaultBackdrop, image: EFStyleImageFillParamsImage?, backgroundColor: CGColor = EFStyleImageFillParams.defaultBackgroundColor, maskColor: CGColor = EFStyleImageFillParams.defaultMaskColor )
Parameters
icon
The icon to display in the center of the QR code. Defaults to nil.
backdrop
The backdrop configuration. Defaults to default backdrop.
image
The image configuration for background filling. Defaults to nil.
backgroundColor
The background color. Defaults to white.
maskColor
The mask color applied over the image. Defaults to semi-transparent black.