Struct bevy_canvas::PathBuilder [−][src]
pub struct PathBuilder(_);
Builder for a Lyon Path
structure.
This type can be used standalone to just generate Path
s, 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]
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]
&mut self,
ctrl1: Vec2,
ctrl2: Vec2,
to: Vec2
) -> EndpointId
pub fn arc(
&mut self,
center: Vec2,
radii: Vec2,
sweep_angle: f32,
x_rotation: f32
)
[src]
&mut self,
center: Vec2,
radii: Vec2,
sweep_angle: f32,
x_rotation: f32
)
pub fn current_position(&self) -> Vec2
[src]
Trait Implementations
impl Default for PathBuilder
[src]
impl Default for PathBuilder
[src]Auto Trait Implementations
impl RefUnwindSafe for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl Unpin for PathBuilder
impl UnwindSafe for PathBuilder
impl UnwindSafe for PathBuilder
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,