Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlignmentPattern

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

author

Sean Owen

Hierarchy

Index

Constructors

constructor

  • new AlignmentPattern(posX: number, posY: number, estimatedModuleSize: number): AlignmentPattern

Properties

Private estimatedModuleSize

estimatedModuleSize: number

Methods

aboutEquals

  • aboutEquals(moduleSize: number, i: number, j: number): boolean
  • 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.

    Parameters

    • moduleSize: number
    • i: number
    • j: number

    Returns boolean

combineEstimate

  • combineEstimate(i: number, j: number, newModuleSize: number): AlignmentPattern
  • Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new {@code FinderPattern} containing an average of the two.

    Parameters

    • i: number
    • j: number
    • newModuleSize: number

    Returns AlignmentPattern

equals

  • equals(other: Object): boolean

getX

  • getX(): float

getY

  • getY(): float

hashCode

  • hashCode(): int

toString

  • toString(): string

Static distance

Static orderBestPatterns

  • orderBestPatterns(patterns: Array<ResultPoint>): void
  • Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and BC is less than AC, and the angle between BC and BA is less than 180 degrees.

    Parameters

    • patterns: Array<ResultPoint>

      array of three {@code ResultPoint} to order

    Returns void

Generated using TypeDoc