Set selrect for new render modifiers

This commit is contained in:
alonso.torres 2025-05-12 17:43:04 +02:00
parent 6831acb71d
commit fef08dfa18
13 changed files with 200 additions and 72 deletions

View file

@ -103,7 +103,10 @@ fn calculate_group_bounds(
shape_bounds.from_points(result)
}
pub fn propagate_modifiers(state: &State, modifiers: Vec<TransformEntry>) -> Vec<TransformEntry> {
pub fn propagate_modifiers(
state: &State,
modifiers: &Vec<TransformEntry>,
) -> (Vec<TransformEntry>, HashMap<Uuid, Bounds>) {
let shapes = &state.shapes;
let font_col = state.render_state.fonts.font_collection();
@ -306,10 +309,13 @@ pub fn propagate_modifiers(state: &State, modifiers: Vec<TransformEntry>) -> Vec
layout_reflows = Vec::new();
}
modifiers
.iter()
.map(|(key, val)| TransformEntry::new(*key, *val))
.collect()
(
modifiers
.iter()
.map(|(key, val)| TransformEntry::new(*key, *val))
.collect(),
bounds,
)
}
#[cfg(test)]