calibration.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'package:fis_common/event/event_type.dart';
  2. import 'package:fis_measure/interfaces/date_types/point.dart';
  3. import 'package:fis_measure/interfaces/process/workspace/point_info.dart';
  4. import 'package:flutter/painting.dart';
  5. abstract class IStandardLineCalibrationController {
  6. /// 编辑状态
  7. StandardLineCalibrationEditState get editState;
  8. /// 是否在编辑
  9. bool get isEditing;
  10. /// 绘制点集
  11. List<DPoint> get drawPoints;
  12. /// 每个物理单位(cm)占的显示长度
  13. double get displayLengthInPhysics;
  14. /// 进入设置模式
  15. void enterEditMode();
  16. /// 取消编辑
  17. void cancelEdit();
  18. /// 确认编辑结果
  19. void confirmEdit(double physicalLength);
  20. /// 处理手势点
  21. ///
  22. /// [offset] 坐标点
  23. ///
  24. /// [type] 坐标点来源
  25. void executeGesturePoint(Offset offset, PointInfoType type);
  26. /// 准备更新ui
  27. late final FEventHandler<void> updateReady;
  28. /// 编辑状态变化事件
  29. late final FEventHandler<StandardLineCalibrationEditState> editStateChanged;
  30. }
  31. /// 参考校准线编辑状态
  32. enum StandardLineCalibrationEditState {
  33. inactive,
  34. ready,
  35. drawing,
  36. drawn,
  37. done,
  38. }