[][src]Struct iced_graphics::widget::canvas::path::Path

pub struct Path { /* fields omitted */ }
This is supported on feature="canvas" only.

An immutable set of points that may or may not be connected.

A single Path can represent different kinds of 2D shapes!

Implementations

impl Path[src]

pub fn new(f: impl FnOnce(&mut Builder)) -> Self[src]

This is supported on feature="canvas" only.

Creates a new Path with the provided closure.

Use the Builder to configure your Path.

pub fn line(from: Point, to: Point) -> Self[src]

This is supported on feature="canvas" only.

Creates a new Path representing a line segment given its starting and end points.

pub fn rectangle(top_left: Point, size: Size) -> Self[src]

This is supported on feature="canvas" only.

Creates a new Path representing a rectangle given its top-left corner coordinate and its Size.

pub fn circle(center: Point, radius: f32) -> Self[src]

This is supported on feature="canvas" only.

Creates a new Path representing a circle given its center coordinate and its radius.

Trait Implementations

impl Clone for Path[src]

impl Debug for Path[src]

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

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,