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: f32
diffuse_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]
fn clone(&self) -> SpriteRenderArgs
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,