From 7bff36d006df36e51c571f93bee075c32376004c Mon Sep 17 00:00:00 2001 From: Halit Can Date: Wed, 15 Jul 2026 03:04:50 +0300 Subject: [PATCH] fix: add selection_mask and selection_bounds fields to IcedDocument These fields are required by the spec (section S2) but were missed during initial implementation. They support selection mask alpha channel data and selection bounding box coordinates. --- hcie-iced-app/crates/hcie-iced-gui/src/app.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hcie-iced-app/crates/hcie-iced-gui/src/app.rs b/hcie-iced-app/crates/hcie-iced-gui/src/app.rs index 69e2a06..1cea609 100644 --- a/hcie-iced-app/crates/hcie-iced-gui/src/app.rs +++ b/hcie-iced-app/crates/hcie-iced-gui/src/app.rs @@ -203,6 +203,10 @@ pub struct IcedDocument { pub transform_drag_handle: TransformHandle, /// Internal clipboard for copy/paste operations pub internal_clipboard: Option, + /// Selection mask (alpha channel) for the current selection + pub selection_mask: Option>, + /// Selection bounds (x, y, width, height) + pub selection_bounds: Option<(u32, u32, u32, u32)>, /// Crop tool state pub crop_state: CropState, } @@ -524,6 +528,8 @@ impl HcieIcedApp { selection_transform: None, transform_drag_handle: TransformHandle::None, internal_clipboard: None, + selection_mask: None, + selection_bounds: None, crop_state: CropState::default(), }; @@ -1804,6 +1810,8 @@ impl HcieIcedApp { selection_transform: None, transform_drag_handle: TransformHandle::None, internal_clipboard: None, + selection_mask: None, + selection_bounds: None, crop_state: CropState::default(), }); self.active_doc = self.documents.len() - 1; @@ -2223,6 +2231,8 @@ impl HcieIcedApp { selection_transform: None, transform_drag_handle: TransformHandle::None, internal_clipboard: None, + selection_mask: None, + selection_bounds: None, crop_state: CropState::default(), }); }