[][src]Struct gba_hal::data::BlendBrightness

#[repr(transparent)]
pub struct BlendBrightness(_);

Controls brightness blend.

This is x/16, but values above 16 are capped at 16/16.

For each color channel of an affected 1st target pixel the final channel value is as follows:

  • Increase: I = I_1st + (31 - I_1st) * EVY
  • Decrease: I = I_1st - I_1st * EVY

If the blend mode isn't set to BrightnessIncrease or BrightnessDecrease this register has no effect at all.

Methods

impl BlendBrightness[src]

pub const fn new() -> Self[src]

A const "zero value" constructor

impl BlendBrightness[src]

pub const EVY_COEFFICIENT_MASK: u16[src]

pub const fn evy_coefficient(self) -> u16[src]

pub const fn with_evy_coefficient(self, evy_coefficient: u16) -> Self[src]

Trait Implementations

impl PartialEq<BlendBrightness> for BlendBrightness[src]

impl Eq for BlendBrightness[src]

impl Debug for BlendBrightness[src]

impl Copy for BlendBrightness[src]

impl Clone for BlendBrightness[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for BlendBrightness[src]

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

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> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]