Struct iced_graphics::geometry::path::Path
source · pub struct Path { /* private fields */ }
Available on crate feature
geometry
only.Expand description
An immutable set of points that may or may not be connected.
A single Path
can represent different kinds of 2D shapes!
Implementations§
source§impl Path
impl Path
sourcepub fn line(from: Point, to: Point) -> Self
pub fn line(from: Point, to: Point) -> Self
Creates a new Path
representing a line segment given its starting
and end points.
sourcepub fn rectangle(top_left: Point, size: Size) -> Self
pub fn rectangle(top_left: Point, size: Size) -> Self
Creates a new Path
representing a rectangle given its top-left
corner coordinate and its Size
.
sourcepub fn circle(center: Point, radius: f32) -> Self
pub fn circle(center: Point, radius: f32) -> Self
Creates a new Path
representing a circle given its center
coordinate and its radius.
sourcepub fn raw(&self) -> &Path
pub fn raw(&self) -> &Path
Returns the internal lyon_path::Path
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin 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