ResultPoint.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { float, int } from '../customTypings';
  2. /**
  3. * <p>Encapsulates a point of interest in an image containing a barcode. Typically, this
  4. * would be the location of a finder pattern or the corner of the barcode, for example.</p>
  5. *
  6. * @author Sean Owen
  7. */
  8. export default class ResultPoint {
  9. private x;
  10. private y;
  11. constructor(x: float, y: float);
  12. getX(): float;
  13. getY(): float;
  14. equals(other: Object): boolean;
  15. hashCode(): int;
  16. toString(): string;
  17. /**
  18. * Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
  19. * and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
  20. *
  21. * @param patterns array of three {@code ResultPoint} to order
  22. */
  23. static orderBestPatterns(patterns: Array<ResultPoint>): void;
  24. /**
  25. * @param pattern1 first pattern
  26. * @param pattern2 second pattern
  27. * @return distance between two points
  28. */
  29. static distance(pattern1: ResultPoint, pattern2: ResultPoint): float;
  30. /**
  31. * Returns the z component of the cross product between vectors BC and BA.
  32. */
  33. private static crossProductZ;
  34. }