[][src]Struct iced::widget::canvas::path::Builder

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

A Path builder.

Once a Path is built, it can no longer be mutated.

Methods

impl Builder[src]

pub fn new() -> Builder[src]

This is supported on feature="canvas" only.

Creates a new Builder.

pub fn move_to(&mut self, point: Point)[src]

This is supported on feature="canvas" only.

Moves the starting point of a new sub-path to the given Point.

pub fn line_to(&mut self, point: Point)[src]

This is supported on feature="canvas" only.

Connects the last point in the Path to the given Point with a straight line.

pub fn arc(&mut self, arc: Arc)[src]

This is supported on feature="canvas" only.

Adds an Arc to the Path from start_angle to end_angle in a clockwise direction.

pub fn arc_to(&mut self, a: Point, b: Point, radius: f32)[src]

This is supported on feature="canvas" only.

Adds a circular arc to the Path with the given control points and radius.

The arc is connected to the previous point by a straight line, if necessary.

pub fn ellipse(&mut self, arc: Elliptical)[src]

This is supported on feature="canvas" only.

Adds an Ellipse to the Path using a clockwise direction.

pub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, to: Point)[src]

This is supported on feature="canvas" only.

Adds a cubic Bézier curve to the Path given its two control points and its end point.

pub fn quadratic_curve_to(&mut self, control: Point, to: Point)[src]

This is supported on feature="canvas" only.

Adds a quadratic Bézier curve to the Path given its control point and its end point.

pub fn rectangle(&mut self, top_left: Point, size: Size)[src]

This is supported on feature="canvas" only.

Adds a rectangle to the Path given its top-left corner coordinate and its Size.

pub fn circle(&mut self, center: Point, radius: f32)[src]

This is supported on feature="canvas" only.

Adds a circle to the Path given its center coordinate and its radius.

pub fn close(&mut self)[src]

This is supported on feature="canvas" only.

Closes the current sub-path in the Path with a straight line to the starting point.

pub fn build(self) -> Path[src]

This is supported on feature="canvas" only.

Builds the Path of this Builder.

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

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> From<T> for T[src]

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

impl<T> SetParameter for T

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>,