summaryrefslogtreecommitdiffstats
path: root/examples/bezier_tool/src
diff options
context:
space:
mode:
authorLibravatar Gigas002 <24297712+Gigas002@users.noreply.github.com>2024-03-27 19:47:48 +0900
committerLibravatar GitHub <noreply@github.com>2024-03-27 19:47:48 +0900
commit19afc66cadfc7ea230d4d749b0d7b0197e29cf93 (patch)
treed012dff84003f2d7d18a1e6bc4bdac62df73b322 /examples/bezier_tool/src
parent4334e63ba1dd88b367f3b7f2790b7869d11d12c0 (diff)
parent1df1cf82f4c9485533f2566c8490cfe188b4ae6a (diff)
downloadiced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.tar.gz
iced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.tar.bz2
iced-19afc66cadfc7ea230d4d749b0d7b0197e29cf93.zip
Merge branch 'master' into viewer_content_fit
Diffstat (limited to 'examples/bezier_tool/src')
-rw-r--r--examples/bezier_tool/src/main.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs
index cf70bd40..289c919b 100644
--- a/examples/bezier_tool/src/main.rs
+++ b/examples/bezier_tool/src/main.rs
@@ -143,23 +143,18 @@ mod bezier {
bounds: Rectangle,
cursor: mouse::Cursor,
) -> Vec<Geometry> {
- let content = self.state.cache.draw(
- renderer,
- bounds.size(),
- |frame: &mut Frame| {
+ let content =
+ self.state.cache.draw(renderer, bounds.size(), |frame| {
Curve::draw_all(self.curves, frame);
frame.stroke(
&Path::rectangle(Point::ORIGIN, frame.size()),
Stroke::default().with_width(2.0),
);
- },
- );
+ });
if let Some(pending) = state {
- let pending_curve = pending.draw(renderer, bounds, cursor);
-
- vec![content, pending_curve]
+ vec![content, pending.draw(renderer, bounds, cursor)]
} else {
vec![content]
}