diff options
Diffstat (limited to '')
| -rw-r--r-- | wgpu/src/widget/canvas/path.rs | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/wgpu/src/widget/canvas/path.rs b/wgpu/src/widget/canvas/path.rs index d714ad05..19d8879a 100644 --- a/wgpu/src/widget/canvas/path.rs +++ b/wgpu/src/widget/canvas/path.rs @@ -43,6 +43,14 @@ impl Path {          Self::new(|p| p.rectangle(top_left, size))      } +    /// Creates a new [`Path`] representing a circle given its center +    /// coordinate and its radius. +    /// +    /// [`Path`]: struct.Path.html +    pub fn circle(center: Point, radius: f32) -> Self { +        Self::new(|p| p.circle(center, radius)) +    } +      #[inline]      pub(crate) fn raw(&self) -> &lyon::path::Path {          &self.raw | 
