summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget/canvas/stroke.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-30 07:38:46 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-30 07:38:46 +0200
commitd4c4198f7242f168de65146e0ca339e0c1cbfe9b (patch)
tree89ba3fb312c65264593720586df7e55726550e21 /wgpu/src/widget/canvas/stroke.rs
parent1501a93915b3704a1d57da4c390a8ebca4e35c8b (diff)
downloadiced-d4c4198f7242f168de65146e0ca339e0c1cbfe9b.tar.gz
iced-d4c4198f7242f168de65146e0ca339e0c1cbfe9b.tar.bz2
iced-d4c4198f7242f168de65146e0ca339e0c1cbfe9b.zip
Write documentation for the new `canvas` API
Diffstat (limited to 'wgpu/src/widget/canvas/stroke.rs')
-rw-r--r--wgpu/src/widget/canvas/stroke.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/wgpu/src/widget/canvas/stroke.rs b/wgpu/src/widget/canvas/stroke.rs
index e20379cd..5b6fc56a 100644
--- a/wgpu/src/widget/canvas/stroke.rs
+++ b/wgpu/src/widget/canvas/stroke.rs
@@ -15,18 +15,32 @@ pub struct Stroke {
}
impl Stroke {
+ /// Sets the color of the [`Stroke`].
+ ///
+ /// [`Stroke`]: struct.Stroke.html
pub fn with_color(self, color: Color) -> Stroke {
Stroke { color, ..self }
}
+ /// Sets the width of the [`Stroke`].
+ ///
+ /// [`Stroke`]: struct.Stroke.html
pub fn with_width(self, width: f32) -> Stroke {
Stroke { width, ..self }
}
+ /// Sets the [`LineCap`] of the [`Stroke`].
+ ///
+ /// [`LineCap`]: enum.LineCap.html
+ /// [`Stroke`]: struct.Stroke.html
pub fn with_line_cap(self, line_cap: LineCap) -> Stroke {
Stroke { line_cap, ..self }
}
+ /// Sets the [`LineJoin`] of the [`Stroke`].
+ ///
+ /// [`LineJoin`]: enum.LineJoin.html
+ /// [`Stroke`]: struct.Stroke.html
pub fn with_line_join(self, line_join: LineJoin) -> Stroke {
Stroke { line_join, ..self }
}