summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget/canvas/path.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-12 07:08:49 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-12 07:08:49 +0100
commitf34407bfdaf06c4bf204dc31b152be9451c243b8 (patch)
treeaa9c48f24c9babb5722c2a7cdc098365b010796c /wgpu/src/widget/canvas/path.rs
parent74dd79e97f83d3e9e13d87444740edeb353f9be8 (diff)
downloadiced-f34407bfdaf06c4bf204dc31b152be9451c243b8.tar.gz
iced-f34407bfdaf06c4bf204dc31b152be9451c243b8.tar.bz2
iced-f34407bfdaf06c4bf204dc31b152be9451c243b8.zip
Implement `Frame::fill` and `Frame::stroke`
Diffstat (limited to 'wgpu/src/widget/canvas/path.rs')
-rw-r--r--wgpu/src/widget/canvas/path.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/wgpu/src/widget/canvas/path.rs b/wgpu/src/widget/canvas/path.rs
index 86326e8e..96206256 100644
--- a/wgpu/src/widget/canvas/path.rs
+++ b/wgpu/src/widget/canvas/path.rs
@@ -9,10 +9,16 @@ impl Path {
pub fn new(f: impl FnOnce(&mut Builder)) -> Self {
let mut builder = Builder::new();
+ // TODO: Make it pure instead of side-effect-based (?)
f(&mut builder);
builder.build()
}
+
+ #[inline]
+ pub(crate) fn raw(&self) -> &lyon::path::Path {
+ &self.raw
+ }
}
#[allow(missing_debug_implementations)]