updateCropRect method

void updateCropRect({
  1. required Size viewportSize,
  2. required Size imageRenderSize,
  3. required Rect cropRect,
  4. bool enforceBounds = true,
})

Updates the crop rect without resetting the transformation

Implementation

void updateCropRect({
  required Size viewportSize,
  required Size imageRenderSize,
  required Rect cropRect,
  bool enforceBounds = true,
}) {
  // Only update the crop rect, don't reset transformation
  _viewportCropRect = cropRect;
  // Optionally re-enforce bounds
  if (enforceBounds) {
    _enforceStaticCropBounds();
  }
}