123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import 'package:fis_common/event/event_type.dart';
- import 'package:fis_measure/interfaces/date_types/point.dart';
- import 'package:fis_measure/interfaces/enums/annotation.dart';
- import 'package:fis_measure/interfaces/process/workspace/point_info.dart';
- import 'package:flutter/painting.dart';
- /// 注释
- abstract class IAnnotationItem {
- /// 类型
- AnnotationType get type;
- /// 状态
- AnnotationStates get state;
- /// 记录集合
- List<IAnnotationItemFeature> get features;
- /// 当前注释
- IAnnotationItemFeature? get feature;
- /// 注释文本
- String? get text;
- set text(String? value);
- /// 处理手势
- bool execute(PointInfo args);
- /// 结束最后一次操作状态
- void finishLast();
- /// Feature更新
- late final FEventHandler<IAnnotationItemFeature?> featureUpdated;
- }
- /// 注释记录
- abstract class IAnnotationItemFeature {
- /// 坐标
- DPoint get position;
- /// 是否活动
- bool get isActive;
- /// 绘制
- void paint(Canvas canvas, Size size);
- }
|