You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current generator handles a lot of functionality, and its complex behavior is only adjustable by the parameters it decides to expose, and all customizations have to be offered by us. Instead, we should consider composition.
The generator can probably be divided into 2 steps:
CodePointGenerator, where input is the content and output is some 2D Bool array (or other types)
core library provides EFQRCodePointGenerator
CodePointRenderer, where input is 2D bool array and can output to some sort of canvas (CGContext, SwiftUI canvas, ...)
what inspirations we can draw from string interpolation/codable (to support rendering custom types)?
Additionally, to make implementing renderer easier, the core library should provide helpers like
QRCodePoint utility
given a coordinate, what kind of point it is? (e.g. part of timing pattern)
what are all the locations of a specific kind of point?
Obsoleted
Everything inside EFQRCode+Migration-v6.swift will be marked with obsoleted instead of deprecated.
EFQRCodeMode.none will be officially replaced by EFQRCodeMode?.none (i.e. nil), with a public static let that shows it's been renamed to nil.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
New Features
There are many requests for other styles/code kinds, so probably some architectural redesign that's more modular to allow more customizations.
Archtecture Redesign (Draft)
The current generator handles a lot of functionality, and its complex behavior is only adjustable by the parameters it decides to expose, and all customizations have to be offered by us. Instead, we should consider composition.
The generator can probably be divided into 2 steps:
CodePointGenerator
, where input is the content and output is some 2D Bool array (or other types)EFQRCodePointGenerator
CodePointRenderer
, where input is 2D bool array and can output to some sort of canvas (CGContext, SwiftUI canvas, ...)Additionally, to make implementing renderer easier, the core library should provide helpers like
QRCodePoint
utilityObsoleted
obsoleted
instead ofdeprecated
.EFQRCodeMode.none
will be officially replaced byEFQRCodeMode?.none
(i.e.nil
), with a public static let that shows it's been renamed tonil
.Beta Was this translation helpful? Give feedback.
All reactions