Shape tools

This commit is contained in:
Skyler Lehmkuhl
2026-03-07 07:27:45 -05:00
parent 354b96f142
commit a628d8af37
9 changed files with 660 additions and 414 deletions
@@ -182,7 +182,13 @@ impl InfopanelPane {
&& matches!(tool, Tool::Transform)
&& shared.selection.raster_floating.is_some();
let has_options = is_vector_tool || is_raster_paint_tool || is_raster_transform || matches!(
let is_raster_select = active_is_raster && matches!(tool, Tool::Select);
let is_raster_shape = active_is_raster && matches!(
tool,
Tool::Rectangle | Tool::Ellipse | Tool::Line | Tool::Polygon
);
let has_options = is_vector_tool || is_raster_paint_tool || is_raster_transform
|| is_raster_select || is_raster_shape || matches!(
tool,
Tool::PaintBucket | Tool::RegionSelect | Tool::MagicWand | Tool::QuickSelect
);
@@ -326,6 +332,23 @@ impl InfopanelPane {
}
}
Tool::Select if is_raster_select => {
use crate::tools::SelectionShape;
ui.horizontal(|ui| {
ui.label("Shape:");
ui.selectable_value(
&mut shared.raster_settings.select_shape,
SelectionShape::Rect,
"Rectangle",
);
ui.selectable_value(
&mut shared.raster_settings.select_shape,
SelectionShape::Ellipse,
"Ellipse",
);
});
}
Tool::MagicWand => {
use crate::tools::FillThresholdMode;
ui.horizontal(|ui| {