EFStyleParamIcon
public class EFStyleParamIcon
Icon configuration for QR code customization.
This class defines how an icon is displayed in the center of a QR code, including its appearance, size, and positioning.
## Usage
let icon = EFStyleParamIcon(
image: .static(myLogoImage),
mode: .scaleAspectFill,
alpha: 0.9,
borderColor: .white,
percentage: 0.25
)
-
Creates an icon configuration for QR code customization.
Declaration
Swift
public init( image: EFStyleParamImage, mode: EFImageMode = .scaleAspectFill, alpha: CGFloat = 1, borderColor: CGColor, percentage: CGFloat = 0.2 )
Parameters
image
The image to display as the icon.
mode
The scaling mode for the icon image. Defaults to
.scaleAspectFill
.alpha
The transparency level of the icon (0.0 to 1.0). Defaults to 1.0.
borderColor
The border color of the icon.
percentage
The size of the icon as a percentage of the QR code size. Defaults to 0.2.