Struct bevy_canvas::PathBuilder[][src]

pub struct PathBuilder(_);

Builder for a Lyon Path structure.

This type can be used standalone to just generate Paths, but its intended use is to facilitate the implementation of complex geometries. Wiew the Geometry trait documentation to learn more.

Usage

use bevy::math::Vec2;
use bevy_canvas::PathBuilder;

let mut b = PathBuilder::new();
b.line_to(Vec2::new(100.0, 200.0));
b.quadratic_bezier_to(Vec2::new(150.0, 300.0), Vec2::splat(200.0));

let path = b.build();

Implementations

impl PathBuilder[src]

pub fn new() -> Self[src]

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

pub fn move_to(&mut self, to: Vec2) -> EndpointId[src]

pub fn line_to(&mut self, to: Vec2) -> EndpointId[src]

pub fn close(&mut self)[src]

pub fn quadratic_bezier_to(&mut self, ctrl: Vec2, to: Vec2) -> EndpointId[src]

pub fn cubic_bezier_to(
    &mut self,
    ctrl1: Vec2,
    ctrl2: Vec2,
    to: Vec2
) -> EndpointId
[src]

pub fn arc(
    &mut self,
    center: Vec2,
    radii: Vec2,
    sweep_angle: f32,
    x_rotation: f32
)
[src]

pub fn current_position(&self) -> Vec2[src]

Trait Implementations

impl Default for PathBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

impl<T> FromWorld for T where
    T: Default

impl<T> Instrument for T[src]

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

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<T> Upcast<T> for T

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