import 'package:fis_measure/interfaces/date_types/point.dart';
import 'package:fis_measure/interfaces/date_types/rect_region.dart';
import 'package:fis_measure/interfaces/enums/uint.dart';
import 'package:fis_measure/interfaces/process/physical_coordinates/physical_coordinate.dart';
import 'package:fis_measure/interfaces/process/viewports/image_boundary.dart';
import 'package:fis_measure/process/viewports/image_boundaries.dart';
import 'package:fis_measure/process/visual/tissue_area.dart';
import 'package:vid/us/vid_us_unit.dart';

import 'viewport.dart';

class TissueViewPort extends ViewPort<TissueArea, ITissuePhysicalCoordinate> {
  TissueViewPort(
    TissueArea tissueArea,
    ITissuePhysicalCoordinate physicalCoordinate,
    VidUsUnit xUnit,
    VidUsUnit yUnit,
    bool isFlipHorizontal,
    bool isFlipVertical,
    RectRegion region,
  ) : super(
          tissueArea,
          xUnit,
          yUnit,
          isFlipHorizontal,
          isFlipVertical,
          region,
        ) {
    physical = physicalCoordinate;
    imageBoundary = LinearBoundary();
  }

  @override
  DPoint convert(DPoint point) {
    return physical!.convert(point);
  }

  @override
  DPoint convertBack(DPoint point) {
    return physical!.convertBack(point);
  }
}
