1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import 'dart:ui';
- import 'package:fis_measure/interfaces/process/items/item.dart';
- import 'package:fis_measure/interfaces/process/items/item_metas.dart';
- import 'package:fis_measure/interfaces/process/items/types.dart';
- import 'package:fis_measure/interfaces/process/workspace/point_info.dart';
- import 'package:fis_measure/process/calcuators/a_b_ratio.dart';
- import 'package:fis_measure/process/calcuators/stenosis.dart';
- import 'package:fis_measure/process/calcuators/three_distance.dart';
- import 'package:fis_measure/process/items/item_feature.dart';
- import 'package:fis_measure/process/items/top_item.dart';
- import 'package:fis_measure/process/items/top_item_feature.dart';
- import 'package:fis_measure/process/primitives/straightline.dart';
- import 'package:fis_measure/process/primitives/trace.dart';
- import 'two_length.dart';
- class TwoArea extends TwoLengthAbstract<TwoAreaFeature> {
- static const String _area1Key = "A1";
- static const String _area2Key = "A2";
- late final Trace a1;
- late final Trace a2;
- TwoArea(ItemMeta meta) : super(meta) {
- final metaA1 = meta.getChildByName(_area1Key)!;
- final metaA2 = meta.getChildByName(_area2Key)!;
- a1 = Trace.createAreaPerimeter(metaA1, this);
- a2 = Trace.createAreaPerimeter(metaA2, this);
- childItems.add(a1);
- childItems.add(a2);
- }
- @override
- Trace get child1 => a1;
- @override
- Trace get child2 => a2;
- @override
- TwoAreaFeature buildFeature() => TwoAreaFeature(this);
- @override
- void onCancelingOnce() {}
- static TwoArea crateStenosis(ItemMeta meta, [IMeasureItem? parent]) {
- var twoArea = TwoArea(meta);
- twoArea.calculator = StenosisCal(twoArea);
- return twoArea;
- }
- static TwoArea crateABRatio(ItemMeta meta, [IMeasureItem? parent]) {
- var twoArea = TwoArea(meta);
- twoArea.calculator = ABRatioCal(twoArea);
- return twoArea;
- }
- }
- class TwoAreaFeature extends TopMeasureItemFeature {
- TwoAreaFeature(
- ITopMeasureItem refItem,
- ) : super(refItem);
- }
|