Struct bevy_svg::prelude::SvgBuilder[][src]

pub struct SvgBuilder { /* fields omitted */ }

Builder for loading a SVG file and building a SvgBundle.

Implementations

impl SvgBuilder[src]

pub fn from_file<P: AsRef<Path>>(path: P) -> SvgBuilder[src]

Create a SvgBuilder to load a SVG from a file.

pub fn origin(self, origin: Origin) -> SvgBuilder[src]

Change the origin of the SVG’s coordinate system. The origin is also the Bevy origin.

pub fn position(self, translation: Vec3) -> SvgBuilder[src]

Position at which the SvgBundle will be spawned in Bevy. The origin of the SVG coordinate system will be at this position.

pub fn scale(self, scale: Vec2) -> SvgBuilder[src]

Value by which the SVG will be scaled, default is (1.0, 1.0).

pub fn build<'s>(self) -> Result<SvgBundle, Box<dyn Error>>[src]

Load and finish the SVG content into a SvgBundle, which then will be spawned by the [SvgPlugin].

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