viewport.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import 'package:fis_measure/interfaces/date_types/point.dart';
  2. import 'package:fis_measure/interfaces/date_types/rect_region.dart';
  3. import 'package:fis_measure/interfaces/process/visuals/visual_area.dart';
  4. import 'package:flutter/painting.dart';
  5. import 'package:vid/us/vid_us_unit.dart';
  6. import '../physical_coordinates/physical_coordinate.dart';
  7. import 'image_boundary.dart';
  8. /// 测量视口
  9. abstract class IViewPort {
  10. IVisualArea get area;
  11. /// 物理坐标协调器
  12. IPhysicalCoordinate? get physical;
  13. /// 所在区域(相对于整个图像)
  14. RectRegion get region;
  15. /// 图像区域(可能会超出[region])
  16. IImageBoundary get imageBoundary;
  17. /// 是否水平翻转
  18. bool get isFlipHorizontal;
  19. /// 是否垂直翻转
  20. bool get isFlipVertical;
  21. /// X轴单位
  22. VidUsUnit get xUnit;
  23. /// Y轴单位
  24. VidUsUnit get yUnit;
  25. /// 转换标准区间
  26. Size get convertBoundary;
  27. /// 转换为[region]中的逻辑化坐标点
  28. DPoint convert(DPoint point);
  29. /// 将逻辑化坐标点转换为相对于与[region]的规范化坐标点
  30. DPoint convertBack(DPoint point);
  31. }