pub struct Path { /* private fields */ }Implementations§
Source§impl Path
impl Path
pub fn new() -> Path
pub fn is_empty(&self) -> bool
pub fn segs(&self) -> &[PathSeg]
pub fn move_to(&mut self, p: impl Into<Point>) -> &mut Path
pub fn line_to(&mut self, p: impl Into<Point>) -> &mut Path
pub fn quad_to(&mut self, c: impl Into<Point>, p: impl Into<Point>) -> &mut Path
pub fn cubic_to( &mut self, c1: impl Into<Point>, c2: impl Into<Point>, p: impl Into<Point>, ) -> &mut Path
pub fn close(&mut self) -> &mut Path
pub fn polyline(&mut self, points: &[Point]) -> &mut Path
pub fn spline(&mut self, points: &[Point], tension: f32) -> &mut Path
pub fn polygon(&mut self, points: &[Point]) -> &mut Path
pub fn rect(&mut self, rect: Rect) -> &mut Path
pub fn rounded_rect( &mut self, rect: Rect, radius: impl Into<Radius>, ) -> &mut Path
pub fn circle(&mut self, center: impl Into<Point>, radius: f32) -> &mut Path
pub fn ellipse( &mut self, center: impl Into<Point>, rx: f32, ry: f32, ) -> &mut Path
pub fn arc( &mut self, center: impl Into<Point>, radius: f32, from_deg: f32, to_deg: f32, ) -> &mut Path
pub fn from_svg(data: &str) -> Result<Path, 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) -> Path
pub fn translated(&self, dx: f32, dy: f32) -> Path
pub fn scaled(&self, sx: f32, sy: f32) -> Path
pub fn rotated(&self, radians: f32, pivot: Point) -> Path
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