Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ZXQRCodeDataMask.h 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2012 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. @class ZXBitMatrix;
  17. /**
  18. * Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations
  19. * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix,
  20. * including areas used for finder patterns, timing patterns, etc. These areas should be unused
  21. * after the point they are unmasked anyway.
  22. *
  23. * Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position
  24. * and j is row position. In fact, as the text says, i is row position and j is column position.
  25. */
  26. @interface ZXQRCodeDataMask : NSObject
  27. /**
  28. * Implementations of this method reverse the data masking process applied to a QR Code and
  29. * make its bits ready to read.
  30. *
  31. * @param bits representation of QR Code bits
  32. * @param dimension dimension of QR Code, represented by bits, being unmasked
  33. */
  34. - (void)unmaskBitMatrix:(ZXBitMatrix *)bits dimension:(int)dimension;
  35. - (BOOL)isMasked:(int)i j:(int)j;
  36. /**
  37. * @param reference a value between 0 and 7 indicating one of the eight possible
  38. * data mask patterns a QR Code may use
  39. * @return DataMask encapsulating the data mask pattern
  40. */
  41. + (ZXQRCodeDataMask *)forReference:(int)reference;
  42. @end