diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-31 16:31:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-31 16:33:33 +0200 |
| commit | 5f97e0a77348d4fb1c89a9adf671647f1fa86dc3 (patch) | |
| tree | 2800a61d06ac7cae8e57cb361804c530b1843bb8 /src/geom/rounded.rs | |
| parent | 00f11ae56d6d20b92a8c6ad6f2245c3ad3e94d86 (diff) | |
Make `Paint` not implement `Copy`
Diffstat (limited to 'src/geom/rounded.rs')
| -rw-r--r-- | src/geom/rounded.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/geom/rounded.rs b/src/geom/rounded.rs index dbe21ac6..f445dfcb 100644 --- a/src/geom/rounded.rs +++ b/src/geom/rounded.rs @@ -14,7 +14,7 @@ pub fn rounded_rect( res.push(Shape { geometry: fill_geometry(size, radius), fill, - stroke: if stroke.is_uniform() { stroke.top } else { None }, + stroke: if stroke.is_uniform() { stroke.top.clone() } else { None }, }); } @@ -55,7 +55,7 @@ fn stroke_segments( let max_radius = size.x.min(size.y) / 2.0; for side in [Side::Top, Side::Right, Side::Bottom, Side::Left] { - let continuous = stroke.get(side) == stroke.get(side.next_cw()); + let continuous = stroke.get_ref(side) == stroke.get_ref(side.next_cw()); connection = connection.advance(continuous && side != Side::Left); always_continuous &= continuous; @@ -69,7 +69,7 @@ fn stroke_segments( ); if !continuous { - res.push((mem::take(&mut path), stroke.get(side))); + res.push((mem::take(&mut path), stroke.get_ref(side).clone())); } } |
