Class AlignmentPattern


  • public final class AlignmentPattern
    extends ResultPoint

    Encapsulates an alignment pattern, which are the smaller square patterns found in all but the simplest QR Codes.

    • Constructor Summary

      Constructors 
      Constructor Description
      AlignmentPattern​(float posX, float posY, float estimatedModuleSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean aboutEquals​(float moduleSize, float i, float j)
      Determines if this alignment pattern "about equals" an alignment pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.
      (package private) AlignmentPattern combineEstimate​(float i, float j, float newModuleSize)
      Combines this object's current estimate of a finder pattern position and module size with a new estimate.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • estimatedModuleSize

        private final float estimatedModuleSize
    • Constructor Detail

      • AlignmentPattern

        AlignmentPattern​(float posX,
                         float posY,
                         float estimatedModuleSize)
    • Method Detail

      • aboutEquals

        boolean aboutEquals​(float moduleSize,
                            float i,
                            float j)

        Determines if this alignment pattern "about equals" an alignment pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.

      • combineEstimate

        AlignmentPattern combineEstimate​(float i,
                                         float j,
                                         float newModuleSize)
        Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new FinderPattern containing an average of the two.