You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

FinderPatternInfo.cs 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright 2007 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. namespace ZXing.QrCode.Internal
  17. {
  18. /// <summary>
  19. /// <p>Encapsulates information about finder patterns in an image, including the location of
  20. /// the three finder patterns, and their estimated module size.</p>
  21. /// </summary>
  22. /// <author>Sean Owen</author>
  23. public sealed class FinderPatternInfo
  24. {
  25. private readonly FinderPattern bottomLeft;
  26. private readonly FinderPattern topLeft;
  27. private readonly FinderPattern topRight;
  28. /// <summary>
  29. /// Initializes a new instance of the <see cref="FinderPatternInfo"/> class.
  30. /// </summary>
  31. /// <param name="patternCenters">The pattern centers.</param>
  32. public FinderPatternInfo(FinderPattern[] patternCenters)
  33. {
  34. this.bottomLeft = patternCenters[0];
  35. this.topLeft = patternCenters[1];
  36. this.topRight = patternCenters[2];
  37. }
  38. /// <summary>
  39. /// Gets the bottom left.
  40. /// </summary>
  41. public FinderPattern BottomLeft
  42. {
  43. get
  44. {
  45. return bottomLeft;
  46. }
  47. }
  48. /// <summary>
  49. /// Gets the top left.
  50. /// </summary>
  51. public FinderPattern TopLeft
  52. {
  53. get
  54. {
  55. return topLeft;
  56. }
  57. }
  58. /// <summary>
  59. /// Gets the top right.
  60. /// </summary>
  61. public FinderPattern TopRight
  62. {
  63. get
  64. {
  65. return topRight;
  66. }
  67. }
  68. }
  69. }