summaryrefslogtreecommitdiffstats
path: root/graphics/src/geometry
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-17 20:17:23 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-17 20:17:23 +0100
commitd1dc62ebcdab6ec57605d276a02d6dae1e97c30d (patch)
tree66ab2733d426b887731ba32b32c03a0f1ba43451 /graphics/src/geometry
parentea50ec8df1431c9c6aa8077cd1578c4698dc0314 (diff)
parentd7fffaa801423ae989fa7693f5b1cb424194e1ff (diff)
downloadiced-d1dc62ebcdab6ec57605d276a02d6dae1e97c30d.tar.gz
iced-d1dc62ebcdab6ec57605d276a02d6dae1e97c30d.tar.bz2
iced-d1dc62ebcdab6ec57605d276a02d6dae1e97c30d.zip
Merge branch 'master' into advanced-text
Diffstat (limited to 'graphics/src/geometry')
-rw-r--r--graphics/src/geometry/stroke.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/graphics/src/geometry/stroke.rs b/graphics/src/geometry/stroke.rs
index 2d760a6c..69a76e1c 100644
--- a/graphics/src/geometry/stroke.rs
+++ b/graphics/src/geometry/stroke.rs
@@ -59,9 +59,10 @@ impl<'a> Default for Stroke<'a> {
}
/// The shape used at the end of open subpaths when they are stroked.
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, Default)]
pub enum LineCap {
/// The stroke for each sub-path does not extend beyond its two endpoints.
+ #[default]
Butt,
/// At the end of each sub-path, the shape representing the stroke will be
/// extended by a square.
@@ -71,17 +72,12 @@ pub enum LineCap {
Round,
}
-impl Default for LineCap {
- fn default() -> LineCap {
- LineCap::Butt
- }
-}
-
/// The shape used at the corners of paths or basic shapes when they are
/// stroked.
-#[derive(Debug, Clone, Copy)]
+#[derive(Debug, Clone, Copy, Default)]
pub enum LineJoin {
/// A sharp corner.
+ #[default]
Miter,
/// A round corner.
Round,
@@ -89,12 +85,6 @@ pub enum LineJoin {
Bevel,
}
-impl Default for LineJoin {
- fn default() -> LineJoin {
- LineJoin::Miter
- }
-}
-
/// The dash pattern used when stroking the line.
#[derive(Debug, Clone, Copy, Default)]
pub struct LineDash<'a> {