Fix shape not closed after using Fill Tool (#510)

* Always set shape property 'closed' on fill

* Remove closed property on Shape

* Make color mandatory in Fill

* Fix intersection for filled but open shapes

* Code style tweak

* Add TODO note to rework ClosePath check
This commit is contained in:
Paul Kupper
2022-02-06 14:06:23 -08:00
committed by Keavon Chambers
parent 4d232e6b46
commit 3fc517e1c4
10 changed files with 32 additions and 47 deletions
+2 -2
View File
@@ -612,7 +612,7 @@ fn add_anchor_handle_line(responses: &mut VecDeque<Message>) -> Vec<LayerId> {
let operation = Operation::AddOverlayLine {
path: layer_path.clone(),
transform: DAffine2::IDENTITY.to_cols_array(),
style: style::PathStyle::new(Some(Stroke::new(COLOR_ACCENT, 1.0)), Some(Fill::none())),
style: style::PathStyle::new(Some(Stroke::new(COLOR_ACCENT, 1.0)), None),
};
responses.push_back(DocumentMessage::Overlays(operation.into()).into());
@@ -625,7 +625,7 @@ fn add_shape_outline(responses: &mut VecDeque<Message>) -> Vec<LayerId> {
let operation = Operation::AddOverlayShape {
path: layer_path.clone(),
bez_path: BezPath::default(),
style: style::PathStyle::new(Some(Stroke::new(COLOR_ACCENT, 1.0)), Some(Fill::none())),
style: style::PathStyle::new(Some(Stroke::new(COLOR_ACCENT, 1.0)), None),
closed: false,
};
responses.push_back(DocumentMessage::Overlays(operation.into()).into());