pub struct ColorTransformConfiguration {
pub color_inversion_enabled: Option<bool>,
pub color_correction: Option<ColorCorrectionMode>,
pub color_adjustment_matrix: Option<[f32; 9]>,
pub color_adjustment_pre_offset: Option<[f32; 3]>,
pub color_adjustment_post_offset: Option<[f32; 3]>,
/* private fields */
}
Expand description
The current configuration for accessibility color transforms, which includes color inversion and color correction. This always includes the matrix required to apply the appropriate transforms. Color correction and color inversion may be active simultaneously.
For original RGB value (r, g, b) (each component ranged between 0 and 1), the RGB value of corrected color (r’, g’, b’) is (r’, g’, b’) = color_adjustment_post_offset + color_adjustment_matrix . ((r, g, b) + color_adjustment_pre_offset).
Fields§
§color_inversion_enabled: Option<bool>
When color_inversion_enabled is true, certain colors are inverted across the entire screen. If this field is omitted behavior should remain unchanged.
color_correction: Option<ColorCorrectionMode>
When color_correction is set to DISABLED, colors are displayed normally. When color_correction has different value, colors are modified to correct for the specified type of color blindness. If this field is omitted behavior should remain unchanged.
color_adjustment_matrix: Option<[f32; 9]>
3x3 Matrix in row-major form which will be used by root presenter to apply color correction and color inversion, or a combination fo the two. This field should always be set.
color_adjustment_pre_offset: Option<[f32; 3]>
3x1 vector which is used by root presenter as an offset added to the original RGB color, before it multiplies with the |color_adjustment_matrix|. This field should always be set.
color_adjustment_post_offset: Option<[f32; 3]>
3x1 vector which is used by root presenter as an offset added to the multiplied result of |color_adjustment_matrix| and original RGB color. This field should always be set.
Trait Implementations§
source§impl Clone for ColorTransformConfiguration
impl Clone for ColorTransformConfiguration
source§fn clone(&self) -> ColorTransformConfiguration
fn clone(&self) -> ColorTransformConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ColorTransformConfiguration
impl Debug for ColorTransformConfiguration
source§impl<D: ResourceDialect> Decode<ColorTransformConfiguration, D> for ColorTransformConfiguration
impl<D: ResourceDialect> Decode<ColorTransformConfiguration, D> for ColorTransformConfiguration
source§impl Default for ColorTransformConfiguration
impl Default for ColorTransformConfiguration
source§fn default() -> ColorTransformConfiguration
fn default() -> ColorTransformConfiguration
source§impl<D: ResourceDialect> Encode<ColorTransformConfiguration, D> for &ColorTransformConfiguration
impl<D: ResourceDialect> Encode<ColorTransformConfiguration, D> for &ColorTransformConfiguration
source§impl PartialEq for ColorTransformConfiguration
impl PartialEq for ColorTransformConfiguration
source§fn eq(&self, other: &ColorTransformConfiguration) -> bool
fn eq(&self, other: &ColorTransformConfiguration) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TypeMarker for ColorTransformConfiguration
impl TypeMarker for ColorTransformConfiguration
§type Owned = ColorTransformConfiguration
type Owned = ColorTransformConfiguration
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for ColorTransformConfiguration
impl ValueTypeMarker for ColorTransformConfiguration
§type Borrowed<'a> = &'a ColorTransformConfiguration
type Borrowed<'a> = &'a ColorTransformConfiguration
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ColorTransformConfiguration
impl StructuralPartialEq for ColorTransformConfiguration
Auto Trait Implementations§
impl Freeze for ColorTransformConfiguration
impl RefUnwindSafe for ColorTransformConfiguration
impl Send for ColorTransformConfiguration
impl Sync for ColorTransformConfiguration
impl Unpin for ColorTransformConfiguration
impl UnwindSafe for ColorTransformConfiguration
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)