Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright 2013 ZXing authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "ZXEncodeHints.h"
  17. @class ZXDimension;
  18. /**
  19. * Symbol info table for DataMatrix.
  20. */
  21. @interface ZXDataMatrixSymbolInfo : NSObject
  22. @property (nonatomic, assign, readonly) BOOL rectangular;
  23. @property (nonatomic, assign, readonly) int errorCodewords;
  24. @property (nonatomic, assign, readonly) int dataCapacity;
  25. @property (nonatomic, assign, readonly) int dataRegions;
  26. @property (nonatomic, assign, readonly) int matrixWidth;
  27. @property (nonatomic, assign, readonly) int matrixHeight;
  28. @property (nonatomic, assign, readonly) int rsBlockData;
  29. @property (nonatomic, assign, readonly) int rsBlockError;
  30. /**
  31. * Overrides the symbol info set used by this class. Used for testing purposes.
  32. *
  33. * @param override the symbol info set to use
  34. */
  35. + (void)overrideSymbolSet:(NSArray *)override;
  36. + (NSArray *)prodSymbols;
  37. - (id)initWithRectangular:(BOOL)rectangular dataCapacity:(int)dataCapacity errorCodewords:(int)errorCodewords
  38. matrixWidth:(int)matrixWidth matrixHeight:(int)matrixHeight dataRegions:(int)dataRegions;
  39. - (id)initWithRectangular:(BOOL)rectangular dataCapacity:(int)dataCapacity errorCodewords:(int)errorCodewords
  40. matrixWidth:(int)matrixWidth matrixHeight:(int)matrixHeight dataRegions:(int)dataRegions
  41. rsBlockData:(int)rsBlockData rsBlockError:(int)rsBlockError;
  42. + (ZXDataMatrixSymbolInfo *)lookup:(int)dataCodewords;
  43. + (ZXDataMatrixSymbolInfo *)lookup:(int)dataCodewords shape:(ZXDataMatrixSymbolShapeHint)shape;
  44. + (ZXDataMatrixSymbolInfo *)lookup:(int)dataCodewords allowRectangular:(BOOL)allowRectangular fail:(BOOL)fail;
  45. + (ZXDataMatrixSymbolInfo *)lookup:(int)dataCodewords shape:(ZXDataMatrixSymbolShapeHint)shape fail:(BOOL)fail;
  46. + (ZXDataMatrixSymbolInfo *)lookup:(int)dataCodewords shape:(ZXDataMatrixSymbolShapeHint)shape minSize:(ZXDimension *)minSize maxSize:(ZXDimension *)maxSize fail:(BOOL)fail;
  47. - (int)horizontalDataRegions;
  48. - (int)verticalDataRegions;
  49. - (int)symbolDataWidth;
  50. - (int)symbolDataHeight;
  51. - (int)symbolWidth;
  52. - (int)symbolHeight;
  53. - (int)codewordCount;
  54. - (int)interleavedBlockCount;
  55. - (int)dataLengthForInterleavedBlock:(int)index;
  56. - (int)errorLengthForInterleavedBlock:(int)index;
  57. @end