ZXIWriterOptions.mm 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2023 KURZ Digital Solutions GmbH
  2. //
  3. // SPDX-License-Identifier: Apache-2.0
  4. #import "ZXIWriterOptions.h"
  5. const int AZTEC_ERROR_CORRECTION_0 = 0;
  6. const int AZTEC_ERROR_CORRECTION_12 = 1;
  7. const int AZTEC_ERROR_CORRECTION_25 = 2;
  8. const int AZTEC_ERROR_CORRECTION_37 = 3;
  9. const int AZTEC_ERROR_CORRECTION_50 = 4;
  10. const int AZTEC_ERROR_CORRECTION_62 = 5;
  11. const int AZTEC_ERROR_CORRECTION_75 = 6;
  12. const int AZTEC_ERROR_CORRECTION_87 = 7;
  13. const int AZTEC_ERROR_CORRECTION_100 = 8;
  14. const int QR_ERROR_CORRECTION_LOW = 2;
  15. const int QR_ERROR_CORRECTION_MEDIUM = 4;
  16. const int QR_ERROR_CORRECTION_QUARTILE = 6;
  17. const int QR_ERROR_CORRECTION_HIGH = 8;
  18. const int PDF417_ERROR_CORRECTION_0 = 0;
  19. const int PDF417_ERROR_CORRECTION_1 = 1;
  20. const int PDF417_ERROR_CORRECTION_2 = 2;
  21. const int PDF417_ERROR_CORRECTION_3 = 3;
  22. const int PDF417_ERROR_CORRECTION_4 = 4;
  23. const int PDF417_ERROR_CORRECTION_5 = 5;
  24. const int PDF417_ERROR_CORRECTION_6 = 6;
  25. const int PDF417_ERROR_CORRECTION_7 = 7;
  26. const int PDF417_ERROR_CORRECTION_8 = 8;
  27. @implementation ZXIWriterOptions
  28. - (instancetype)initWithFormat:(ZXIFormat)format {
  29. self = [super init];
  30. self.format = format;
  31. self.width = 0;
  32. self.height = 0;
  33. self.ecLevel = -1;
  34. self.margin = -1;
  35. return self;
  36. }
  37. - (instancetype)initWithFormat:(ZXIFormat)format
  38. width:(int)width
  39. height:(int)height
  40. ecLevel:(int)ecLevel
  41. margin:(int)margin {
  42. self = [super init];
  43. self.format = format;
  44. self.width = width;
  45. self.height = height;
  46. self.ecLevel = ecLevel;
  47. self.margin = margin;
  48. return self;
  49. }
  50. @end