Struct riddle_renderer_common::SpriteRenderArgs[][src]

pub struct SpriteRenderArgs {
    pub location: Vector2<f32>,
    pub pivot: Vector2<f32>,
    pub scale: Vector2<f32>,
    pub angle: f32,
    pub diffuse_color: Color<f32>,
}

Fields

location: Vector2<f32>pivot: Vector2<f32>scale: Vector2<f32>angle: f32diffuse_color: Color<f32>

Implementations

impl SpriteRenderArgs[src]

pub fn new<T: Into<Vector2<f32>>>(location: T) -> Self[src]

New render args, with defaults, at the specified location

pub fn at<T: Into<Vector2<f32>>>(&mut self, location: T) -> &mut Self[src]

Set the location of the sprite, specifying where the pivot should be placed.

pub fn with_pivot<T: Into<Vector2<f32>>>(&mut self, pivot: T) -> &mut Self[src]

Set the pivot of the sprite, relative to the top left of the sprite

pub fn with_scale<T: Into<Vector2<f32>>>(&mut self, scale: T) -> &mut Self[src]

Set the scale at which the sprite will be rendered

pub fn with_angle(&mut self, angle: f32) -> &mut Self[src]

Set the angle at which the sprite will be rendered, in radians.

pub fn with_color(&mut self, color: Color<f32>) -> &mut Self[src]

Set the diffuse color of the sprite, which will be multiplied by the sprite colors.

Trait Implementations

impl Clone for SpriteRenderArgs[src]

impl Debug for SpriteRenderArgs[src]

impl Default for SpriteRenderArgs[src]

Auto Trait Implementations

impl RefUnwindSafe for SpriteRenderArgs

impl Send for SpriteRenderArgs

impl Sync for SpriteRenderArgs

impl Unpin for SpriteRenderArgs

impl UnwindSafe for SpriteRenderArgs

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

type Init = T

The type for initializers.

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.