createNinePointCalibration static method

List<CalibrationPoint> createNinePointCalibration({
  1. double screenWidth = 1920,
  2. double screenHeight = 1080,
})

Create a 9-point calibration pattern for higher accuracy

Returns calibration points in a 3x3 grid pattern.

Implementation

static List<CalibrationPoint> createNinePointCalibration({
  double screenWidth = 1920,
  double screenHeight = 1080,
}) {
  final points = <CalibrationPoint>[];
  int order = 0;

  for (double x in [0.1, 0.5, 0.9]) {
    for (double y in [0.1, 0.5, 0.9]) {
      points.add(CalibrationPoint(
        x: screenWidth * x,
        y: screenHeight * y,
        order: order++,
      ));
    }
  }

  return points;
}