Implement canvas::Path::circle helper method
This commit is contained in:
parent
c545af3577
commit
46cd0891d2
3 changed files with 15 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue