Skip to main content

Scalable

Trait Scalable 

Source
pub trait Scalable {
    // Required methods
    fn scale<T>(&mut self, factor: Vector<T>)
       where T: Scalar + Into<f32>;
    fn set_scale<T>(&mut self, vec: Vector<T>)
       where T: Scalar + Into<f32>;
    fn get_scale(&self) -> Vector<f32>;
}

Required Methods§

Source

fn scale<T>(&mut self, factor: Vector<T>)
where T: Scalar + Into<f32>,

Scale the sprite from a factor

Source

fn set_scale<T>(&mut self, vec: Vector<T>)
where T: Scalar + Into<f32>,

Set the scale of the sprite

Source

fn get_scale(&self) -> Vector<f32>

Get the current scale

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§