com.google.zxing

## Class ResultPoint

- java.lang.Object
- - com.google.zxing.ResultPoint

- Direct Known Subclasses:
    AlignmentPattern, FinderPattern

      public class ResultPoint
      extends Object

  Encapsulates a point of interest in an image containing a barcode. Typically, this would be the location of a finder pattern or the corner of the barcode, for example.

  Author:
    Sean Owen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultPoint(float x, float y)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static float` | `distance(ResultPoint pattern1, ResultPoint pattern2)`
    `boolean` | `equals(Object other)`
    `float` | `getX()`
    `float` | `getY()`
    `int` | `hashCode()`
    `static void` | `orderBestPatterns(ResultPoint[] patterns)` 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.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ResultPoint

          public ResultPoint(float x,
                             float y)

  - ### Method Detail

    - #### getX

          public final float getX()

    - #### getY

          public final float getY()

    - #### equals

          public final boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public final String toString()

      Overrides:
        `toString` in class `Object`

    - #### orderBestPatterns

          public static void orderBestPatterns(ResultPoint[] patterns)

      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 of three `ResultPoint` to order

    - #### distance

          public static float distance(ResultPoint pattern1,
                                       ResultPoint pattern2)

      Parameters:
        `pattern1` - first pattern
        `pattern2` - second pattern
      Returns:
        distance between two points

Copyright © 2007–2018. All rights reserved.