EFQRCode icon indicating copy to clipboard operation
EFQRCode copied to clipboard

Add `patternType`

Open thisIsTheFoxe opened this issue 1 year ago • 0 comments

Hey, nice project!

I recently saw a design for a QR code that used different colors for certain control elements / patterns of a QR code and thought it might be a nice addition.

Functionally this PR doesn't change anything of the base implementations. It just replaces the isStatic parameter of the fillRect function from:

func fillRect(context: CGContext, rect: CGRect, isStatic: Bool)

to expose the specific pattern type:

func fillRect(context: CGContext, rect: CGRect, patternType: EFPointPatternType)

This allows for custom implementations of EFPointStyle to apply an individual styling to the control patterns of a QR code.

Open to any suggestions, would be cool if we could add that to the project.. ^-*

Thanks, and happy #hacktoberfest 🥳

thisIsTheFoxe avatar Oct 05 '24 10:10 thisIsTheFoxe