Struct rog_anime::AnimeImage [−][src]
Container of Led
, each of which specifies a position within the image
The main use of this is to position and sample colours for the final image
to show on AniMe
Fields
scale: Vec2
angle: f32
Angle in radians
translation: Vec2
Position of the image ont he display
bright: f32
Brightness of final image, 0.0
= off, 1.0
= full
Implementations
impl AnimeImage
[src]
pub fn generate() -> Vec<Option<Led>>
[src]
Really only used to generate the output for including as a full const in LED_IMAGE_POSITIONS
pub fn update(&mut self)
[src]
Called after setting new angle, position, or scale to refresh the image samples, the result can then been transformed to the appropriate data for displaying
pub fn from_png(
path: &Path,
scale: f32,
angle: f32,
translation: Vec2,
bright: f32
) -> Result<Self, AnimeError>
[src]
path: &Path,
scale: f32,
angle: f32,
translation: Vec2,
bright: f32
) -> Result<Self, AnimeError>
Generate the base image from inputs. The result can be displayed as is or
updated via scale, position, or angle then displayed again after update()
.
Trait Implementations
impl From<&'_ AnimeImage> for AnimeDataBuffer
[src]
fn from(leds: &AnimeImage) -> Self
[src]
Do conversion from the nested Vec in AniMeMatrix to the two required packets suitable for sending over USB
Auto Trait Implementations
impl RefUnwindSafe for AnimeImage
impl Send for AnimeImage
impl Sync for AnimeImage
impl Unpin for AnimeImage
impl UnwindSafe for AnimeImage
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, 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>,