pub struct Path { /* private fields */ }Implementations§
Source§impl Path
impl Path
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn segs(&self) -> &[PathSeg]
pub fn move_to(&mut self, p: impl Into<Point>) -> &mut Self
pub fn line_to(&mut self, p: impl Into<Point>) -> &mut Self
pub fn quad_to(&mut self, c: impl Into<Point>, p: impl Into<Point>) -> &mut Self
pub fn cubic_to( &mut self, c1: impl Into<Point>, c2: impl Into<Point>, p: impl Into<Point>, ) -> &mut Self
pub fn close(&mut self) -> &mut Self
pub fn polyline(&mut self, points: &[Point]) -> &mut Self
pub fn spline(&mut self, points: &[Point], tension: f32) -> &mut Self
pub fn polygon(&mut self, points: &[Point]) -> &mut Self
pub fn rect(&mut self, rect: Rect) -> &mut Self
pub fn rounded_rect( &mut self, rect: Rect, radius: impl Into<Radius>, ) -> &mut Self
pub fn circle(&mut self, center: impl Into<Point>, radius: f32) -> &mut Self
pub fn ellipse( &mut self, center: impl Into<Point>, rx: f32, ry: f32, ) -> &mut Self
pub fn arc( &mut self, center: impl Into<Point>, radius: f32, from_deg: f32, to_deg: f32, ) -> &mut Self
pub fn from_svg(data: &str) -> Result<Self, PathError>
pub fn as_rect(&self) -> Option<Rect>
pub fn as_rounded_rect(&self) -> Option<(Rect, f32)>
pub fn as_circle(&self) -> Option<(Point, f32)>
pub fn to_svg(&self) -> String
pub fn contours(&self, tolerance: f32) -> Vec<Contour>
pub fn bounds(&self) -> Rect
pub fn bounds_with(&self, tolerance: f32) -> Rect
pub fn contains(&self, p: Point, rule: FillRule) -> bool
pub fn transformed(&self, t: Transform) -> Self
pub fn translated(&self, dx: f32, dy: f32) -> Self
pub fn scaled(&self, sx: f32, sy: f32) -> Self
pub fn rotated(&self, radians: f32, pivot: Point) -> Self
Trait Implementations§
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more