applyMirroredCorrection method

void applyMirroredCorrection(
  1. List<ResultPoint>? points
)

Apply the result points' order correction due to mirroring.

@param points Array of points to apply mirror correction to.

Implementation

void applyMirroredCorrection(List<ResultPoint>? points) {
  if (!_mirrored || points == null || points.length < 3) {
    return;
  }
  final bottomLeft = points[0];
  points[0] = points[2];
  points[2] = bottomLeft;
  // No need to 'fix' top-left and alignment pattern.
}