Manos Chorianopoulos

barcode lib v11

......@@ -161,12 +161,12 @@ extension CouponBarcodeView {
// let isValid = RSUnifiedCodeValidator.shared.isValid("1234567891234", machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue)
if let gen = RSUnifiedCodeGenerator.shared {
// if let gen = RSUnifiedCodeGenerator.shared {
// gen.fillColor = UIColor.white
// gen.strokeColor = UIColor.black
if let image = gen.generateCode("1234567891234", machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: 300, height: 300)) {
if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode("1234567891234", machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: 300, height: 300)) {
// VStack(alignment: .center) {
// Image(uiImage: image)
......@@ -178,12 +178,14 @@ extension CouponBarcodeView {
// .frame(maxWidth: .infinity)
// .padding(.top, self.uiscreen.height * 0.01)
Image(uiImage: image)
// .resizable()
// .aspectRatio(contentMode: .fit)
Image(uiImage: barcodeImage)
.renderingMode(.original)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 300, height: 300)
// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.05)
}
}
// }
// generateBarcode(from: "1234567891234")
// ?
......