pub struct MasteringDisplay {
pub primaries: [[u16; 2]; 3],
pub white_point: [u16; 2],
pub max_luminance: u32,
pub min_luminance: u32,
}Expand description
HDR mastering display color volume (SMPTE 2086)
Fields§
§primaries: [[u16; 2]; 3]RGB primaries in 0.00002 increments [R], [G], [B] Each is [x, y] chromaticity coordinate
white_point: [u16; 2]White point [x, y] in 0.00002 increments
max_luminance: u32Maximum luminance in 0.0001 cd/m² increments
min_luminance: u32Minimum luminance in 0.0001 cd/m² increments
Implementations§
Source§impl MasteringDisplay
impl MasteringDisplay
Sourcepub fn max_luminance_nits(&self) -> f64
pub fn max_luminance_nits(&self) -> f64
Get max luminance in nits (cd/m²)
Sourcepub fn min_luminance_nits(&self) -> f64
pub fn min_luminance_nits(&self) -> f64
Get min luminance in nits (cd/m²)
Sourcepub fn primary_chromaticity(&self, index: usize) -> [f64; 2]
pub fn primary_chromaticity(&self, index: usize) -> [f64; 2]
Get primary chromaticity as normalized floats [0.0, 1.0]
index should be 0 (red), 1 (green), or 2 (blue).
Sourcepub fn white_point_chromaticity(&self) -> [f64; 2]
pub fn white_point_chromaticity(&self) -> [f64; 2]
Get white point as normalized floats [0.0, 1.0]
Trait Implementations§
Source§impl Clone for MasteringDisplay
impl Clone for MasteringDisplay
Source§fn clone(&self) -> MasteringDisplay
fn clone(&self) -> MasteringDisplay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MasteringDisplay
impl Debug for MasteringDisplay
impl Copy for MasteringDisplay
Auto Trait Implementations§
impl Freeze for MasteringDisplay
impl RefUnwindSafe for MasteringDisplay
impl Send for MasteringDisplay
impl Sync for MasteringDisplay
impl Unpin for MasteringDisplay
impl UnsafeUnpin for MasteringDisplay
impl UnwindSafe for MasteringDisplay
Blanket Implementations§
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
Mutably borrows from an owned value. Read more